Jason Dupont
asked on
Knoppix set passwd redirect stdin from file
I am running knoppix kernel 2.6.17 booting from a USB key. I would like to set a password for the root account from my startup script.
I have created a file called passwdtwice, and run the following: passwd <passwdtwice
The passwdtwice file contains:
test123
test123
However, everytime I run the command it says the passwords do not match. They do! I ensured there is a CR after each line too.
Any idea how to make passwd take input from stdin directed from file? (There is no -stdin option for passwd in this version of knoppix).?
Help!
I have created a file called passwdtwice, and run the following: passwd <passwdtwice
The passwdtwice file contains:
test123
test123
However, everytime I run the command it says the passwords do not match. They do! I ensured there is a CR after each line too.
Any idea how to make passwd take input from stdin directed from file? (There is no -stdin option for passwd in this version of knoppix).?
Help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just change the password with 'passwd' tool, then grab the encoded password from /etc/shadow file
ASKER