Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2008 08:14:48 +0300
From:      "Ivan \"Rambius\" Ivanov" <rambiusparkisanius@gmail.com>
To:        "FreeBSD Questions" <freebsd-questions@freebsd.org>
Subject:   How to generate password hashes for vipw and chpass
Message-ID:  <89ce7f740810052214k4419d939s8bb8ebce5e703626@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

According to man pages of chpass(1) and vipw(1)  I can create and
modify users by supplying a user database entry in passwd(5) format.
The only problem I face is that I do not know how to generate the
password hashes for the password field.

Following section 14.4
[http://www.freebsd.org/doc/en/books/handbook/crypt.html] from the
handbook I found out that my system is using md5 to encrypt the
passwords. I tried to use /sbin/md5 to generate the hash:

# /sbin/md5 -s newpassword

and then I passed the output to chpass. I tried to use the new
password for the next login but it failed - so I believe this is
wrong.

Can you please show me how to generate the password hashes?

Regards
Rambius

-- 
Tangra Mega Rock: http://www.radiotangra.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89ce7f740810052214k4419d939s8bb8ebce5e703626>