Piping a password to passwd

Michael Kipper mkipper at rogers.com
Tue Jan 25 04:41:22 PST 2005


Hi,

I'm not sure if this is a -dev question, but here goes:
I build my LFS by scripts, and am having trouble automating the password
portion. I think the following should work:
yes "myr00tpassword" | passwd root
But it hangs at the console, waiting for input:

root at localhost:/# yes "myr00tpasswd" | passwd root
Changing password for root
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password: 

Why is this? Is there a 'proper' way to do this?

Michael




More information about the lfs-dev mailing list