mount_smbfs: syserr: Authetication error (option -N)

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Tue, 14 Jul 2015 15:58:48 +0200
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_at_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_at_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
Received on Tue Jul 14 2015 - 11:58:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC