Is there a tool equivalent to the system "passwd" command (or maybe "adduser" or "useradd") that can support a passwd-file by setting a password, encrypting it with the salted MD5 scheme? The system "passwd" command doesn't have an option to "do it to this alternate file instead of /etc/shadow".
Phil Howard <ttiphil at gmail.com> (Mo 26 Apr 2010 22:31:45 CEST):> Is there a tool equivalent to the system "passwd" command (or maybe > "adduser" or "useradd") that can support a passwd-file by setting a > password, encrypting it with the salted MD5 scheme? The system "passwd" > command doesn't have an option to "do it to this alternate file instead of > /etc/shadow".Some people use ?htpasswd?, but there not password scheme is coded into the password hash. It's not clear what you're seeking - some tool for generating the hashed string (e.g. ?openssl passwd -1 "$cleartext"?) or some tool for managing the entries in the (dovecot) password file. Best regards from Dresden/Germany Viele Gr??e aus Dresden Heiko Schlittermann -- SCHLITTERMANN.de ---------------------------- internet & unix support - Heiko Schlittermann HS12-RIPE ----------------------------------------- gnupg encrypted messages are welcome - key ID: 48D0359B --------------- gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B - -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20100426/18c247f2/attachment-0002.bin>
On Mon, Apr 26, 2010 at 4:38 PM, Heiko Schlittermann <hs at schlittermann.de>wrote:> Some people use ?htpasswd?, but there not password scheme is coded into > the password hash. > > It's not clear what you're seeking - some tool for generating the hashed > string (e.g. ?openssl passwd -1 "$cleartext"?) or some tool for managing > the > entries in the (dovecot) password file. >I left it vague to handle some variety. Something to add/delete users is nice. Something to change password in place is nice. Something that given a user and plain text password and everything else Dovecot needs when using it as userdb, and would output to stdout the line contents that would go into the file, would do the job. I want to avoid re-inventing the wheel. If there are no wheels, I guess I'll just look up the salted-MD5 format details and do it.