This is an old problem, an in my experience the connection between windows and samba is unstable and different for every implementation. Sometimes it works, sometimes it doesn't, often without any apparent logic.

Right now I have a Debian server with a simple samba share:

    path = /mnt/mediadisken
    writeable = yes
    browseable = yes
    guest ok = no
    public = no

I have two linux system users, both of which have been added to samba with smbpasswd -a frankh smbpasswd -a smbadmin

Listing the users, everything seems to be in order:

$sudo pdbedit -w -L
frankh:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:2D8141C0E359DBCF9D8948BA154715B6:[U          ]:LCT-56E42E95:
smbadmin:1002:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:B5797194788F406F023865AE8FAAE318:[U          ]:LCT-56E42F02:

Still, I'm unable to connect to the share from Windows 7 64. I get the login, and enter the correct username and passord, and get "Access denied".

I've tried using just the username in windows, as well as SMBSERVERIP\username, both without success.

Where should I begin to troubleshoot this, which should've been straight-forward and easy?

  • 1
    Have you checked the permissions of the /mnt/mediadisken directory so that frankh and smbadmin have permissions to access it? – Tero Kilkanen Mar 12 '16 at 16:36
  • I even tried setting chmod a+rwx on the entire mounted folder. No help. – Frank H. Mar 12 '16 at 17:50
  1. If you haven't already, I'd first verify the samba share is accessible from another computer running linux.

    mount -t cifs -o username=<share user>,password=<share password> // /mnt

Then verify it mounted it successfully.

  1. For what it's worth I'd try the Samba config below; this was taken from a working production setup with samba share on centos 7, and windows users accessing with username and password.

    security = user
    passdb backend = tdbsam
    Map to guest = Bad User
    username map = /etc/samba/smbusers
    path = /share
    valid users = frankh smbadmin
    public = yes
    writable = yes
    browseable = yes
    create mode = 0666
    directory mode = 0777
    oplocks = false
  • Thanks. Seems that the problem is with the samba server and not with Windows, at least. I cannot connect from the other Linux client (which I should've checked first). I also copied the config you posted, and restarted the server, but I still cannot connect - from Linux of Windows. The Linux error is mount error(13): permission denied. – Frank H. Mar 12 '16 at 17:47
  • I'd take a look here and double check your setup steps then, ubuntugeek.com/… – Peter Mar 12 '16 at 17:56

Your Answer

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

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