| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=RUDhQ85yUdR614sMmkCqgX43ml/O68MrHioH/LijGijoG8tEiCeOR | |
| 5Fr1q6ag95Ndl1JjTgTxihw32TG9sP08FK5qtNGv02MxUBUn+OhNnf2g114JAnI/ | |
| KEYIAHWEPZWwWxCeXACd00CzU426+MnywHQB9PlJw5FxBc4lPTRVKs= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=oWy+KDhuP3X36hodoCNbOxuSOHY=; b=vtt13JYyjJ/oi10vRIP0VlGu63Jc | |
| 6WDl9mV1KS6ThjChh31ohOAvRnUx7MiTJaMC7EzSObxK1bcbrRNV3TA2c/WbZHPB | |
| QU2GSFEcXCfWyxUPGh2AwNymkXrg01PVxyX2Z84A4XRFVhsb4OqLTrRMNG+TQJ9q | |
| SpZLqio87gcAdUU= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-91.9 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,LIKELY_SPAM_BODY,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=2710, $6wos, UD:UudC.lLOSB1G3D1bIboWxlixzBy2xO, zkp2jdm |
| X-HELO: | calimero.vinschen.de |
| Date: | Fri, 29 Jan 2016 13:09:19 +0100 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Weird behavior of crypt |
| Message-ID: | <20160129120919.GB14874@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <CAFFOgCUoiL06QNFvXOJ-E46FOmpG4S_K4O52k+rt_Ysxpw2aag AT mail DOT gmail DOT com> <56AB4F64 DOT 3070807 AT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <56AB4F64.3070807@gmail.com> |
| User-Agent: | Mutt/1.5.24 (2015-08-30) |
--Pd0ReVV5GZGQvF3a
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Jan 29 12:39, Marco Atzeri wrote:
>=20
>=20
> On 29/01/2016 12:18, Alexandre Garnier wrote:
> >Hello.
> >I'm trying to do SHA-512 password encryption, but the result is really
> >weird on Cygwin:
> >
> ># On Cygwin(either 32 or 64) 2.4.1-1, latest updates with crypt 1.1-1,
> >libcrypt0 1.1-1, libcrypt-devel 1.1-1
> >$ crypt '$6$7dl4B0fKUimdnR$' test_value
> >$6wOs/zKP2jDM
> >
> >$ python -c 'import crypt; print crypt.crypt("test_value",
> >"$6$7dl4B0fKUimdnR$")' # Python 2.7.10
> >$6wOs/zKP2jDM
> >
> >$ perl -e 'print crypt("test_value", "\$6\$7dl4B0fKUimdnR\$")."\n"' #
> >Perl v5.22.1
> >$6wOs/zKP2jDM
> >
> >Am I missing something?
> >
> >On other system, I get a more expected result:
> >
> ># On Ubuntu 15.04
> >$ mkpasswd --method=3DSHA-512 test_value 7dl4B0fKUimdnR
> >$6$7dl4B0fKUimdnR$f6gCu.3IfrxhsnJKFnusDH.UudC.lLOSB1G3D1bIboWxlixzBy2xO/=
3rCKHmzfwekCTvmQd11bPdcsJOaLkCJ.
> >
You're aware that the password field in /etc/passwd is not used, right?
Passwords are checked against the Windows user DB. In fact, /etc/passwd
is not necessary anymore.
> Not SHA-512, see
> /usr/share/doc/crypt/crypt.README
>=20
> This is the DES-crypt package Version 1.1
>=20
> It provides a static library libcrypt.a as well as a shared library
> cygcrypt-0.dll together with a link lib libcrypt.dll.a, which export
> the functions
>=20
> crypt(3)
> encrypt(3)
> setkey(3)
>=20
> The passwords created by crypt(3) are 56 bit DES encrypted and are
> 100% identical to those created by the Linux crypt().
Right. If you need the hashes for other purposes than /etc/passwd,
you can use `openssl sha512'
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--Pd0ReVV5GZGQvF3a
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWq1ZvAAoJEPU2Bp2uRE+gxgQP/1sTIVLj+uIy2ZIGm2lYq/aq
7/usogPuLwW9mK2gbgm6ssx9BWNki9XNHufavmXybImY4hHvSM1VyA/23wSLef6a
TLPUDIsJTO+sOVwPtBKYxYNNJOvSpSR2ur5VgRR/wMLUp0wUW6dnbx7xlIDVznRX
+xQPUbtrv+UQYonD0tu2hIzsf2NWR1bQj6on1oTb75mpZqImuUrp9gnBGSu0CSop
ZSqMRfv0cKILLJQOZ37HgQOEoWEbBog7LHPMxjQSDBUM8jdS1DN+ZBr0JOld9AlS
7nUx9nJNOelPdovojxqvKEZp7WFQ9L7A7RsaFNiFS+9aed1CkLQVZboiwKqyV1Uy
RZrUSbbK8zp6kAzc837IE3L1NIJcgI6yXB2/fY4T7gKAdfoMGj7+GsolCgbZvomb
63+tBcOCUpUgrUjf54W1xd2RYjRTxIlHeAcEnatVg+DgxCTifucNpi/TBKG3w1oh
Zy3Qgl4geWU5BtEIzhShDRKhOLrYbiKn4WslAOwlDR6wK8lC08VmFwz8PvVh8a2N
A6UwjiV27fLz5rmFWqMW/K/Bja89bBuHkCInh82jRk9rEqNhW4MVthSjm0ZgeCOy
v6Kn/ik0xQ0NmfF7WNpC5xwuws4nS+QPNre5hPg+lryPcsqb4hdgyf4XSymLKAmn
obPhljL2UntQTMWi1yNZ
=SvzL
-----END PGP SIGNATURE-----
--Pd0ReVV5GZGQvF3a--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |