Date: Sun, 20 Aug 2000 23:37:23 -0600 From: Chris Fedde <chris@fedde.littleton.co.us> To: D M P <dmp@aracnet.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Encrypting a password for insertion using chpass(1)? Message-ID: <200008210537.e7L5bNj25784@fedde.littleton.co.us> In-Reply-To: <39A099E1.51E6B546@aracnet.com>
index | next in thread | previous in thread | raw e-mail
On Sun, 20 Aug 2000 19:54:25 -0700 D M P wrote:
+------------------
| I need to syncronize a server's user passwords to those in a database.
| The database spits out cleartext passwords. I have to somehow get
| those into the password database on the server. The first way I came
| up with was calling chpass(1) and feeding it the new password, but
| according to the man page, it will only take encrypted passwords, not
| cleartexts.
|
| How do I encrypt a password so I can insert it using chpass?
|
| Is there another way I can do this?
+------------------
Sure there is. You can create unix des style encrypted passwords realy
easy. Here is perl that does it:
perl -le 'print crypt("foo", "foo")'
Note that "foo" is used for both the password and the salt. This technique
should be at least as secure as keeping the cleartext passwords in a
database server ;-}
chris
--
Chris Fedde
303 773 9134
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008210537.e7L5bNj25784>
