From owner-freebsd-questions Sat Jan 25 18:24:23 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A81D137B401 for ; Sat, 25 Jan 2003 18:24:21 -0800 (PST) Received: from sub21-156.member.dsl-only.net (sub21-156.member.dsl-only.net [63.105.21.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13C6A43F13 for ; Sat, 25 Jan 2003 18:24:21 -0800 (PST) (envelope-from nkinkade@sub21-156.member.dsl-only.net) Received: from nkinkade by sub21-156.member.dsl-only.net with local (Exim 4.10) id 18ccT1-00025p-00 for freebsd-questions@freebsd.org; Sat, 25 Jan 2003 18:24:15 -0800 Date: Sat, 25 Jan 2003 18:24:15 -0800 From: Nathan Kinkade To: freebsd-questions@freebsd.org Subject: Re: Commands to check encrypted passwords (was Re: Misc Questions.) Message-ID: <20030126022415.GE2440@sub21-156.member.dsl-only.net> Reply-To: nkinkade@dsl-only.net Mail-Followup-To: freebsd-questions@freebsd.org References: <3E32DDB6.7040308@potentialtech.com> <20030125193503.GD2440@sub21-156.member.dsl-only.net> <200301252148.03388.will@unfoldings.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZInfyf7laFu/Kiw7" Content-Disposition: inline In-Reply-To: <200301252148.03388.will@unfoldings.net> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ZInfyf7laFu/Kiw7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 25, 2003 at 09:48:03PM +0200, Willie Viljoen wrote: > Nathan, >=20 > This won't work, the md5 system command is to generated md5 message diges= ts.=20 > These are very different from salted passwords, which are a one-way=20 > encryption that will almost never be the same. Message digests are always= the=20 > same, using them to encrypt passwords would be abit silly :) >=20 > Digests are used (normally) to check the integrity of a downloaded file. >=20 > To do this from the command line (without compiling a C program to use it= from=20 > libcrypt) you can use perl, as Matthew Seamon points out: >=20 > % perl -e 'print crypt(q{password}, q{$1$xxxxxxxx$}), "\n";' > $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a. >=20 > In this case, the xxxx's would be the 8 character MD5 salt. >=20 > Will Will, Thanks for the clarification! My own ignorance on the subject led me to post bad info to the list! I'll have to read up on all this. Thanks, Nathan --=20 GPG Public Key ID: 0x4250A04C gpg --keyserver pgp.mit.edu --recv-keys 4250A04C http://63.105.21.156/gpg_nkinkade_4250A04C.asc --ZInfyf7laFu/Kiw7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+M0bPWZYS9EJQoEwRAmR0AKCwFrJ4W3uJeOD08Z2iPlIeqehQUQCeKqdG B68+s1RNYeyg9KWt0VZEroY= =9CvK -----END PGP SIGNATURE----- --ZInfyf7laFu/Kiw7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message