Samba – Cannot access Debian smb share from Windows 7 64

linux-networkingnetwork-sharesambawindows 7

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:

[mediadisken]
    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?

Best Answer

  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> //1.2.3.4/sharename /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.

    [global] 
    security = user
    passdb backend = tdbsam
    Map to guest = Bad User
    username map = /etc/samba/smbusers
    
    
    [mediadisken]
    path = /share
    valid users = frankh smbadmin
    public = yes
    writable = yes
    browseable = yes
    create mode = 0666
    directory mode = 0777
    oplocks = false