I have setup a samba share folder, however, when I try to access the share, I am getting "Windows Can not access the \\server\share1. You don't have permissions to access \\server\share1"

This server is joined to AD and I am able to list the shares using smbclient and AD User credentials. I don't know what I am missing. Strange thing is that the Share1 does not even prompt to enter different credentials, however pops up the access denied message.

[root@samba]# smbclient -L samba -U username
Enter user's password:
Domain=[EXAMPLE] OS=[Unix] Server=[Samba 3.6.23-35.el6_8]

        Sharename       Type      Comment
        ---------       ----      -------
        share1          Disk      Test Share

Here is the smb.conf:

        workgroup = EXAMPLEDOMAIN
        ;password server = ad-cxxac.example.com
        realm = EXAMPLE.COM
        security = ads
        ;idmap uid = 10000-20000
        ;idmap gid = 10000-20000
        template shell = /bin/sh
        winbind use default domain = true
        winbind offline logon = true
        winbind refresh tickets = yes
        log file = /var/log/samba/samba.log
        debug level = 3
        netbios name = samba
        encrypt passwords = yes
        winbind enum groups = no
        winbind enum users = no
        debuglevel = 3

#============================ Share Definitions ==============================
        comment = Test Share
        path = /share1
        valid users =  EXAMPLE\username
        force group = "Domain Users"
        writable = yes
        read only = no
        force create mode = 0660
        create mask = 0777
        directory mask = 0777
        force directory mode = 0777

Domain Join is OK as well

[root@samba]# net ads testjoin
Join is OK

Directory permissions on the Shared Folder are

drwxrwxrwx.    2 root   domain users  4096 Sep  share1
  • I gotta ask, what are the directory permissions on /share1? (ls -ld /share1/) – Centimane Sep 19 '17 at 16:03
  • sorry, forgot to mention in the orginal question, i switched them to 0777, but didn't work. drwxrwxrwx. 2 root domain users 4096 Sep share1 – heavyguidence Sep 19 '17 at 16:06
  • What does /var/log/samba/samba.log say when you try to connect? It should say why it blocked the connection. Are you running a firewall? Can you mount it on localhost? – Centimane Sep 19 '17 at 16:07
  • [2017/09/19 11:11:05.824193, 2] smbd/sesssetup.c:1293(setup_new_vc_session) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2017/09/19 11:11:05.843859, 1] smbd/service.c:1114(make_connection_snum) ( connect to service share1 initially as user DOMAIN\gsingh (uid=10xx0, gid=1x0x0) (pid 507) – heavyguidence Sep 19 '17 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.