On Sun, Nov 09, 2003 at 04:41:30PM -0200, romildo@xxxxxxxxxxx wrote: > I see that the command "useradd" does have the "-p passwd" option, > but the "passwd" should be encrypted, as returned by crypt(3). Then > how can I obtain the encrypted password? $ perl -e 'print crypt("password", "salt") . "\n"' sa3tHJ3/KuYvI > Any clues? # useradd joe; echo password | passwd --stdin joe This has the advantage that joe will get an md5 password hash rather than a less secure crypted one. -- John Kodis Goddard Space Flight Center kodis@xxxxxxxxxxxxxxxxxxxxx Greenbelt, Maryland, USA Phone: 301-286-7376 Fax: 301-286-1771