From owner-freebsd-questions@freebsd.org Tue Jul 14 10:35:01 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE5E599C38D for ; Tue, 14 Jul 2015 10:35:01 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE124F4 for ; Tue, 14 Jul 2015 10:35:01 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) for freebsd-questions@freebsd.org with esmtp (envelope-from ) id <1ZExY4-003BeN-5w>; Tue, 14 Jul 2015 12:34:52 +0200 Received: from p578a69f9.dip0.t-ipconnect.de ([87.138.105.249] helo=freyja.zeit4.iv.bundesimmobilien.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) for freebsd-questions@freebsd.org with esmtpsa (envelope-from ) id <1ZExY4-001YsL-0D>; Tue, 14 Jul 2015 12:34:52 +0200 Date: Tue, 14 Jul 2015 12:34:46 +0200 From: "O. Hartmann" To: freebsd-questions@freebsd.org Subject: Howto create password hash for Windows server 2012 with freeBSD/Samba Message-ID: <20150714123446.3dfc808d@freyja.zeit4.iv.bundesimmobilien.de> Organization: FU Berlin X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: 87.138.105.249 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2015 10:35:02 -0000 Scenario: A CURRENT box is to mount a share from a windows server 2012r2 machine using autofs(5). Setting up the SHAREs on Windows 2012 side and connecting to those shares via FreeBSD's mount_smbfs(8) manually went smoothly. But when it comes to automated mounting a Windows 2012 share via automounter (autofs) I fail. Autofs is setup using mount_smbfs with the "-N" option. regarding the documentation /etc/nsmb.conf is looked up for an appropriate setup and password=XXXXX field. Cleartext passwords do not work with M$ server 2012r2. Now I'm looking for a way to generate a "Hash" to put it into /etc/nsmb.conf. Some websites tell the hash is NT MD4 hash. generating a md4 hash with FreeBSD's onboard-tools is not possible, as far as i can see. crypt(3) uses the ability to generate a NT hash depending on the mode set for using the appropriate hash algorithm, but I can not see how I could use/misuse passwd or any related onboard tool to emmit a NT hash. Please CC me via email (not subscribing the list) and help and suggestions are highly appreciated. Thanks in advance, Oliver