2

EDIT: The problem actually turned out to be a missing file error. Still can't fix that :/ The missing file is /var/lib/samba/usershares/public

EDIT2: Can't even access the server itself. Googled and found the answer. It's down there /

Basically, title says it all, but here's my smb.conf (without comments):

[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

[printers]
    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    print ok = Yes
    browseable = No

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

[public]
    path = /home/public/public
    valid users = public
    read only = No

And here's my directory info:

total 36K
527845 drwx--x--x 3 public public 4.0K Dec  3 14:45 .
524289 drwxr-xr-x 6 root   root   4.0K Dec  3 13:38 ..
527847 -rw-r--r-- 1 public public  220 Dec  3 13:21 .bash_logout
527848 -rw-r--r-- 1 public public 3.7K Dec  3 13:21 .bashrc
527846 -rw-r--r-- 1 public public 8.8K Dec  3 13:21 examples.desktop
527849 -rw-r--r-- 1 public public  675 Dec  3 13:21 .profile
527429 drwxrwxrwx 2 public root   4.0K Dec  3 14:45 public

BTW, sorry, I'm a bit of a noob in Samba. Hope you'll understand.
Thanks in advance,
matemate01

PS: I've done the smbpasswd -a public and tried my best to follow this tutorial

Here's my actual error:

tree connect failed: NT_STATUS_ACCESS_DENIED
4
  • And how are you trying to connect?
    – psusi
    Dec 5, 2015 at 19:18
  • @psusi Using smbclient \\\\localhost\public -U public. It asks for password and then says that error message. Tried with Windows, using the IP address, gives Access Denied error.
    – ForceMagic
    Dec 5, 2015 at 19:28
  • Check the samba log file? also auth.log.
    – psusi
    Dec 6, 2015 at 2:09
  • @psusi It says can't open username map /etc/samba/smbusers. No such file or directory auth.log says: pam_unix(samba:session): session closed for user nobody PS: Still don't know how to fix that :(
    – ForceMagic
    Dec 6, 2015 at 10:16

2 Answers 2

1

You need to use smbpasswd to add the user to the smb database and set their password.

4
  • Already done that. Still doesn't work.
    – ForceMagic
    Dec 6, 2015 at 14:20
  • @ForceMagic, if you had, then you would not be missing /etc/samba/smbusers.
    – psusi
    Dec 6, 2015 at 14:27
  • @psusi: You're losing it: You're showing up on the Low Quality review queue! >:-) (+1 and voted "Looks OK")
    – Fabby
    Dec 6, 2015 at 15:05
  • @psusi Alright. Completely purged and reinstalled samba. Now it says missing /var/lib/samba/usershares/public I executed these things, if this helps. (Though this is not the complete command-line log.) Still, the client connector says the thing declared on the main question.
    – ForceMagic
    Dec 8, 2015 at 17:23
0

Change the hostname to something less than 15 characters. Write this: netbios name = somethinglessthan15chars under the globals section in /etc/samba/smb.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.