PDA

View Full Version : Create user at boot...



tuds47
04-01-2005, 11:02 AM
Hi
Does anybody habe an idea on how to create SSH enabled users at boot. I have a system where i boot Feather Linux (Knoppix remaster) from a USB stick, and I would like to add a user doing boot, so when the system is booted I can access it from a SSH client. I would prefer not to include the users in a remaster since it is not as dynamic as adding users from the knoppix.sh script.
I have tried to use the useradd and passwd functions, but the passwd function needs a input from the keyboard so I can not use it doing boot. Further I have tried to generate a shadow and passwd file with the passwords and users created, and then replacing the shadow and passwd files created doing boot with the ones with passwords and it works, but when I try to do it in the knoppix.sh script the file will be overridden with the default files after the knoppix.sh script has been executed.
Does anybody have a clue on a solution to this problem?

Regards
Thorbjørn