On Wed, Nov 15, 2000 at 12:13:24PM -0800, Chris Morton wrote:
| Is there a way to add a single user and password using parameters from the
| command line?
[...]
| The one thing I was unable to do was to set the password without intervention
| when the user was added.
[...]
| Is there a better way of doing this? I don't like writing the password out to
| the hard drive, even if I delete it a second later. I was just unable to find
| another way to do it that didn't require input from the user after the initial
| invocation of the script.
The encryption is perfectly well documented. If this script is running
as root (simply so it has access to the /etc/passwd file etc) you can
do the encryption yourself. For example, see the pwcrypt script:
http://www.zip.com.au/~cs/scripts/pwcrypt
Takes password on stdin, writes encryption to stdout. Do with the
encryption as you see fit. For example, the pw script:
http://www.zip.com.au/~cs/scripts/pw
Which takes a login name as argument, prompts for a password, and sets
the encryption in the password file. It calls pwcrypt to read the
password and emit the encryption.
These may do the trick for you.
--
Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/
Holly: Emergency. Emergency. There's an emergency going on. It's still going
on. It's still an emergency. This is an emergency announcement.
- Red Dwarf, _Confidence and Paranoia_
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list