Smbclient NT_STATUS_ACCESS_DENIED

About once every 10 years I have to fight SAMBA when I move to new hosts, and then I suppress the traumatic memory until I retrain it next time: S Hence this new question.

I have an Ubuntu VM with multiple shares - one ("Open") is unsecured, the other ("Public2") is secured with the intent to only be accessed with an authenticated user account defined on Ubuntu. Both parts show up in Windows Explorer on both XP and Win8.1. However, I have been unable to figure out for a lifetime how to log into the secure Public2 share.

Due to the Windows client not logging out, I tried to simply return to the box with smbclient, which produces the following output indicating that it simply cannot authenticate:

michael@ubuntu:~$ smbclient //ubuntu/Public2 --user=michael%mypasswd
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]
tree connect failed: NT_STATUS_ACCESS_DENIED

      

Meanwhile, an unsecured share is available. What (possibly incredibly obvious) am I missing? Am I wrong with my username?

/var/lib/samba/usershares/public (unsecure, works) contains:


#VERSION 2
path=/home/michael/Public
comment=
usershare_acl=S-1-1-0:F
guest_ok=y
sharename=Public

      

/ var / lib / samba / usershares / public2 (which I cannot access) contains:

#VERSION 2
path=/home/michael/Public2
comment=
usershare_acl=S-1-1-0:F
guest_ok=n
sharename=Public2

      

+3


source to share


2 answers


A working colleague pointed me in the right direction:

The Linux user ID used to access the Linux share must have a second password "samba" defined for it. The easiest way to do this is to install and run the Samba Server Configuration GUI application, which is not installed by default.

The Samba documentation explains this, but it is steeped in docks, explaining all the various arcane aspects of configuration samba.conf

, etc.



The following article gets to the heart of the topic:

http://ubuntuhandbook.org/index.php/2014/05/ubuntu1404-file-sharing-samba/

+3


source


For users who use for command line parameter, use

$ sudo smbpasswd -a <user_name>

      



this will prompt you to assign a password.

+3


source







All Articles