Set pre-encrypted passwords for users
Joel Merrick
joel.merrick at gmail.com
Wed Mar 31 09:38:55 CEST 2010
n Wed, Mar 31, 2010 at 8:26 AM, Mathias Friman <mathias.friman at knorca.se> wrote:
> Hi!
>
> I use some old scripts to create users on a FAI-install system. In them
> I run the 30-demo script from simple examples:
>
> $ROOTCMD adduser --disabled-login --gecos "fai demo user" demo
> echo "demo:$ROOTPW" | $ROOTCMD chpasswd --encrypted
>
Use useradd or usermod
ie..
useradd -o -s /bin/bash -p $ENCPASS user
> Since Ubuntu 9.10 the chpasswd command does not accept the --encrypted
> switch anymore, so it is impossible to supply a pre-encrypted password that
> way.
>
> Is there any other way to do this and still not write the password in clear text?
>
> Kindest regards,
> Mathias
>
--
$ echo "kpfmAdpoofdufevq/dp/vl" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
More information about the linux-fai
mailing list