MD5 Support
Andrew Pollock
andrew-fai at andrew.net.au
Tue Jan 28 12:13:32 CET 2003
A less kludgey method of enabling MD5 password support is:
echo "set passwd/md5 true" | chroot /tmp/target debconf-communicate
DEBIAN_FRONTEND=Noninteractive chroot /tmp/target dpkg-reconfigure passwd
Is there a FAQ for FAI? This MD5 question pops up every now and then...
Andrew
On Tue, Jan 28, 2003 at 06:41:14PM +1100, senaque at thepla.net wrote:
>
> The following 3-line solution (for generating the MD5 password) seems to work fairly well:
>
> makemd5passwd:
>
> #!/usr/bin/perl
> $pass="fai";
> $saltstring=`makepasswd --chars=8`;
> printf("%s\n", crypt("$pass","\$1\$$saltstring"));
>
> It doesn't really need to use makepasswd program (debian makepasswd package) but it is a
> pretty cute and useful program as it uses /dev/urandom for generating the salt (non-time based).
> Otherwise, would need PERL to generate the random salt...Needless to say it also requires PERL
> installed ;-)
>
> Then use makemd5passwd with 'chpass' like so:
>
> echo "root:`makemd5passwd`" | chpasswd -e
>
> This will tell chpasswd program to change the password for the root user to the encrypted
> password generated by makemd5passwd.
>
> Alternatively, just use makemd5passwd to generate the string for rootpw= variable in
> DEFAULT.var (maybe fai-setup can do it?) and/or feed it to cfengine to modify /etc/shadow in
> hooks.
>
> I still have yet to find out what packages or configuration settings will be needed for md5 to be
> enabled.
>
> Senaque
> ---
> E-MAIL: senaque at thepla.net
> IRC: #FAI @ irc.freenode.net
> WWW: http://www.sf.net/users/senaque/
>
More information about the linux-fai
mailing list