Knoppix set passwd redirect stdin from file
Posted on 2007-08-10
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:
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).?