2

I'm trying to setup some samba shares in 14.04. After defining the shares, I can connect and also list the defined shares, but when I try to mount a share, I get the error: NT_STATUS_ACCESS_DENIED (using smbclient on the command line)

Here's my smb.conf:

[global]
    server string = %h server (Samba, Ubuntu)
    server role = standalone server
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    unix password sync = Yes
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    dns proxy = No
    usershare allow guests = Yes
    panic action = /usr/share/samba/panic-action %d
    idmap config * : backend = tdb
    guest ok = Yes

[Share01]
    path = /media/username/Data HD/Folder01
    directory mask = 0777

[Share02]
    path = /media/username/Data HD/Folder02
    directory mask = 0777

I'm using Samba 4.1.6, which is installed automatically if you want to share a folder from Unity.

Update: I've added a share pointing to a folder inside my home folder, that works. The two shares above (Share01 and Share02) point to folders on an external harddrive. Both internal and external HD have EXT4 filesystems.

Thanks for your help!

1 Answers1

2

After some more digging around, I found a post that suggested force setting a user for the share. After adding:

force user = myusername

to my configuration, I can now use the shares. After first adding it to the individual shares, I tried to add it to the global section. This seems to work for all shares then. Hopefully this will be useful to others!

Some more information can be found on my blog.