Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2015 15:58:48 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        freebsd-current@freebsd.org
Subject:   mount_smbfs: syserr: Authetication error (option -N)
Message-ID:  <20150714155848.7ee77773@freyja.zeit4.iv.bundesimmobilien.de>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150714155848.7ee77773>