Bug#406046: [Pkg-shadow-devel] Bug#406046: Useradd: limits password
to eight characters
nicolas.francois at centraliens.net
Tue Jan 9 14:06:08 CET 2007
On Tue, Jan 09, 2007 at 11:32:32AM +0100, tinaweb at bestemselv.com wrote:
> Nicolas François wrote:
> Yes, I realize that now after studying crypt some more. By the way, the
> reason for using 'useradd' was the need for making a script to add a
> batch of users read from a file. That's afaik not easily done with
> 'adduser' .
You may be interested by the 'newusers' utility. But I don't remember
what kind of password it uses.
Otherwise, you can just generate MD5 password instead of DES passwords:
mkpasswd -H md5 <password>
(mkpasswd comes from the whois package)
openssl passwd -1 toto
Note: When you do so, make sure the machine can be trusted (i.e. that another
user won't see the password by using ps), or use the variants that receive
the password from a file or stdin.
> A slight clarification in the man page for useradd would be nice I
> think. Maybe also add something in the description of the -p option that
> the described method (crypt) truncates the password to eight characters?
I'm not sure it can be clarified more (IMO, useradd receive an encrypted
password, which can be DES or MD5).
More information about the Pkg-shadow-devel