Results 1 to 5 of 5

Thread: NT_STATUS_ACCESS_DENIED while accessing a samba share

  1. #1
    Join Date
    Jan 2011
    Beans
    2

    NT_STATUS_ACCESS_DENIED while accessing a samba share

    HI,

    In our peer-to-peer Windows LAN, I'm attempting to use Ubuntu as the file server.
    I've created a samba share but I cannot access it from the server itself, let alone other machines.

    I've gone through almost all threads I could find on the forums but none of them deal with this specific problem.

    Here's the error I get:

    saukap@saukap-laptop:/etc/samba$ smbclient //localhost/sambashare -U smbguest
    Enter smbguest's password:
    Anonymous login successful
    Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.4]
    tree connect failed: NT_STATUS_ACCESS_DENIED

    The relevant sections from my smb.conf are:

    1. The sambashare entry:

    [sambashare]
    path = /var/share
    comment = first samba share
    valid users = smbguest
    directory mask = 0777
    create mode = 0777
    read only = no
    available = yes
    browseable = yes
    writable = no
    guest ok = no
    public = no
    printable = no
    locking = no
    strict locking = no

    2. The global section from my smb.conf (as generated by GADMIN-SAMBA):

    [global]
    netbios name = saukap-lenovo
    server string = Samba file and print server
    workgroup = WORKGROUP
    security = user
    hosts allow = 127. 192.168.1.
    interfaces = 127.0.0.1/8 192.168.1.0/24
    bind interfaces only = yes
    remote announce = 192.168.1.255
    remote browse sync = 192.168.1.255
    printcap name = cups
    load printers = yes
    cups options = raw
    printing = cups
    guest account = smbguest
    log file = /var/log/samba/samba.log
    max log size = 1000
    null passwords = yes
    username level = 6
    password level = 6
    encrypt passwords = yes
    unix password sync = yes
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    local master = no
    domain master = no
    preferred master = no
    domain logons = no
    os level = 33
    logon drive = m:
    logon home = \\%L\homes\%u
    logon path = \\%L\profiles\%u
    logon script = %G.bat
    time server = no
    name resolve order = wins lmhosts bcast host
    wins support = no
    wins proxy = no
    dns proxy = no
    preserve case = yes
    short preserve case = yes
    client use spnego = no
    client signing = no
    client schannel = no
    server signing = no
    server schannel = no
    nt pipe support = yes
    nt status support = yes
    allow trusted domains = no
    obey pam restrictions = yes
    enable spoolss = yes
    client plaintext auth = no
    disable netbios = no
    follow symlinks = no
    update encrypted = yes
    pam password change = no
    passwd chat timeout = 120
    hostname lookups = no
    username map = /etc/samba/smbusers
    passdb backend = tdbsam
    passwd program = /usr/bin/passwd '%u'
    passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
    add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
    add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
    add group script = /usr/sbin/groupadd '%g'
    delete user script = /usr/sbin/userdel '%u'
    delete user from group script = /usr/sbin/userdel '%u' '%g'
    delete group script = /usr/sbin/groupdel '%g'
    add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
    machine password timeout = 120
    idmap uid = 16777216-33554431
    idmap gid = 16777216-33554431
    template shell = /dev/null
    winbind use default domain = yes
    winbind separator = @
    winbind cache time = 360
    winbind trusted domains only = yes
    winbind nested groups = no
    winbind nss info = no
    winbind refresh tickets = no
    winbind offline logon = no

    regards,
    Saurabh

  2. #2
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: NT_STATUS_ACCESS_DENIED while accessing a samba share

    I realize this is probably a silly question - but you DID create a Linux and Samba user named smbguest?
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  3. #3
    Join Date
    Jan 2011
    Beans
    2

    Re: NT_STATUS_ACCESS_DENIED while accessing a samba share

    I didn't create the smbuser explicitly but I do find its entry in /etc/passwd and a mapping to 'nobody' user in /etc/samba/smbusers, as follows:

    # Unix_name = SMB_Name1 SMB_Name2 ...
    root = administrator
    nobody = guest smbguest pcguest

  4. #4
    Join Date
    Jul 2012
    Beans
    1

    Re: NT_STATUS_ACCESS_DENIED while accessing a samba share

    just an observation your share shows "read only = no" but a few lines down also show "writable = no". and also browsable, available, public. these are contradicting each other. I would remove one or the other, restart smbd and giver her another whirl.

    like this:

    [sambashare]
    path = /var/share
    comment = first samba share
    valid users = smbguest
    directory mask = 0777
    create mode = 0777
    browseable = yes
    writable = yes
    guest ok = no
    printable = no

    try this one and see if it works better

    cyber9
    Last edited by cyber9; July 8th, 2012 at 10:00 AM.

  5. #5
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    27,948
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: NT_STATUS_ACCESS_DENIED while accessing a samba share

    Hi, this is an old thread so it has been closed, please do not post in threads that are a year or more old, and thanks for sharing.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •