From owner-freebsd-current@freebsd.org Tue Jul 14 13:58:56 2015 Return-Path: Delivered-To: freebsd-current@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 B61A199BE9B for ; Tue, 14 Jul 2015 13:58:56 +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 74E79AA3 for ; Tue, 14 Jul 2015 13:58:56 +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-current@freebsd.org with esmtp (envelope-from ) id <1ZF0jV-003Js2-Lq>; Tue, 14 Jul 2015 15:58:53 +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-current@freebsd.org with esmtpsa (envelope-from ) id <1ZF0jV-001tWc-Fy>; Tue, 14 Jul 2015 15:58:53 +0200 Date: Tue, 14 Jul 2015 15:58:48 +0200 From: "O. Hartmann" To: freebsd-current@freebsd.org Subject: mount_smbfs: syserr: Authetication error (option -N) Message-ID: <20150714155848.7ee77773@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-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2015 13:58:56 -0000 Running CURRENT and trying to mount a "share" provided by a M$ Windows 2012R2 server via autofs fails with an authetication error. I tested successfully to mount the share via mount_smbfs manually, but whenever I provide the option "-N" I receive this sticky authentication error. The manpage for mount_smbfs refers to /etc/nsmb.conf and therein the password should be provided in cleartext or simple encrypted. Further, the FreeBSD onboard tool "smbutil crypt SOMEPASSWORD" is suggested, creating a weak obscured password hash for exactly the purpose I described above. Mounting the share via mount_smbfs -I XXX.XXX.XXX.XXX //user@NetBIOSName/ShareName /mount/point results in being asjed for the password interactively and after providing the correct password by typing into the console, the share is mounted successfully. Now, with only the option "-N" added: mount_smbfs -N -I XXX.XXX.XXX.XXX //user@NetBIOSName/ShareName /mount/point which is supposed to fetch the password from /etc/nsmb.conf or ~/nsmb.conf or ~/.nsmbrc (I created successively all of them) via the "password=$$1XXXXXXXXXXXXXXX" tag, fails. The file looks like [...] [default] [ShareName] password=$$1XXXXXXXXXXXXXXXXX [...] I tried to encapsulate the password with single- or doublequotes, but nothing worked so far. I suspect that the documentation is in a bad shape hiding the fact that mount_smbfs is providing via interactive mode the right hash, but neither cleartext nor the manpgae-suggested solution within nsmb.conf provides the correct hashed/non-hashed password. The aim is to provide on an embedded system (NanoBSD) a share, mounted on demand via AUTOFS. This fails so far for the automatic password provision. Interactive provided password works like a charme. Can someone shed some light on this problem? How can I create a proper hash for the password (FreeBSD onboard tools?) and how to provide AUTOFS or mount_smbfs with option -N with this password? Thank you very much in advance, Oliver Hartmann