From owner-freebsd-questions@FreeBSD.ORG Mon Dec 23 02:50:10 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 545EE798; Mon, 23 Dec 2013 02:50:10 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1CC871EBB; Mon, 23 Dec 2013 02:50:09 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa07.fnfis.com (8.14.5/8.14.5) with ESMTP id rBN2o8An023855 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sun, 22 Dec 2013 20:50:08 -0600 Received: from LTCFISWMSGMB21.FNFIS.com ([169.254.1.7]) by LTCFISWMSGHT03.FNFIS.com ([10.132.206.31]) with mapi id 14.03.0158.001; Sun, 22 Dec 2013 20:50:07 -0600 From: "Teske, Devin" To: RW Subject: Re: setting encrypted password for a user Thread-Topic: setting encrypted password for a user Thread-Index: AQHO/tlAHDuWhzhkh0KAI6J7Kl+KDA== Date: Mon, 23 Dec 2013 02:50:07 +0000 Message-ID: <1FCEF95A-F37A-4A57-B3A8-AE67776749BE@fisglobal.com> References: <1387690591.75236.YahooMailNeo@web165002.mail.bf1.yahoo.com> <79C9317F-84B9-4F8F-8D5F-4DE0B63ED056@fisglobal.com> <20131223005530.352d08fb@gumby.homeunix.com> In-Reply-To: <20131223005530.352d08fb@gumby.homeunix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.120] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87, 1.0.14, 0.0.0000 definitions=2013-12-22_03:2013-12-20,2013-12-22,1970-01-01 signatures=0 Cc: Devin Teske , "Teske, Devin" , FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Devin Teske List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 02:50:10 -0000 On Dec 22, 2013, at 4:55 PM, RW wrote: > On Sun, 22 Dec 2013 05:47:08 +0000 > Teske, Devin wrote: >=20 >>=20 >> On Dec 21, 2013, at 9:36 PM, M. V. wrote: >>=20 >>> hello, >>>=20 >>> I'm using FreeBSD-8.2. I have a program which sends "MD5=20 >>> of the new password" of a user to me, and I want to reset user's >>> password with it. I realized I can use "chpass" to set encrypted >>> password for a user, but it needs salt and I couldn't make it work >>> without it. so I wanted to know: >>> - can I set user's password in FreeBSD if I have only MD5 of the >>> password? how? >>>=20 >>=20 >> echo 'MD5-HASH' | pw usermod username -H 0 >=20 > Presumably that's just a way inserting the salted hash. If > you simply have the md5 of a password it shouldn't be possible to > create a password entry. RW is correct, if what is sent to you does not look like "$1$blah$moreblah" then you don't have a hash, but a digest. You cannot turn a digest into a hash because that would require getting at the data that was digested. The ``echo ... | pw ...'' command I gave is only going to work if you have a hash (looks like "$1$blah$moreblah") and not a digest (looks like "blah"). --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.