[Gllug] non-interactive passwd
Xander D Harkness
xander at harkness.co.uk
Thu May 8 14:22:17 UTC 2003
Murray Peterson wrote:
>Hi All,
>
>I was wondering if there is any appropriate way of setting a password for
>a user account without running passwd interactively?
>
>essentially I am trying to automagically create accounts on a number
>boxen by script and need to do something like this: (and nis, ldap etc is
>unfortunately not an option...)
>
>passwd $USER $PASSWORD or passwd $USER << echo $PASSWORD
>
>I am trying to do this on solaris and aix, but I would imagine that
>linux would have much the same reaction :)
>
>Anyway, any ideas or pointers to friendly solaris & aix lists would be
>much appreciated!
>
>Regards
>
>Murray
>
>
>
On Linux you can either use
useradd -p $password $user
or useradd $user
passwd --stdin $user < password
My Solaris box is refusing to boot at present so I could not check the
relevant options.
Kind regards
Xander
>
>
>
>
--
"Theres no way to rule innocent men. The only power any government has is the power to crack down on criminals. Well, when there arent enough criminals, one makes them. One declares so many things to be a crime that it becomes impossible for men to live without breaking laws." - Ayn Rand, Atlas Shrugged
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list