I want to have a shared folder using Samba and this folder should be protected by an username-password combination (kind of usual actually). What I've done so far:
- Installed samba (was already installed)
- useradd -m -g users sambauser
- passwd sambauser
- smbpasswd -a sambauser
My configuration file:
[global] workgroup = WORKGROUP security = share share modes = yes [homes] comment = Home Directories browsable = no read only = no create mode = 0750 [JanGrimm] path = /media/JanGrimm public = no writable = yes comment = Jan printable = no valid users = sambauserJanGrimm is the shared folder in media, so the path of my shared folder is /media/JanGrimm
So, I've restarted the samba service and then tried to map the network drive under Windows (10):
Prompting for credentials:
Connecting now:
After some time, it prompts me again:
It obviously doesn't matter what I am entering, it is just not working. For my tries, I disabled the firewall of the server. What is wrong with that? I just can't get around..
32 Answers
I'm on Windows10 and we are using the following working samba config
[global] workgroup = WORKGROUP server string = %h server (Samba, Ubuntu) netbios name = FileServer wins support = yes dns proxy = no name resolve order = lmhots host wins bcast interfaces = 192.168.0.1/24 eth0 bind interfaces only = yes log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d server role = standalone server passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user usershare allow guests = yes
[printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no
[MY_SHARE] writeable = yes path = <your/File/Path> comment = Fileserver guest account = <validUser> wide links = no security = userMaybe it helps you finding a solution. Note that especially in the global section your config seems very short to me
This is very strange in Windows 10: if you use the same userid/password on your windows machine as on the samba server, actually, you do not need to provide a password.
For instance, if your are known in Windows as 'userw' with password 'xyz' and defined exactly the same user and password in samba, when your are prompted for userid/passwd on Windows 10, just enter the userid without entering any password. That will do the trick.
Note that if you enter a password even the correct one, the connection will fail.
Also make sure that the domain you connect to is 'WORKGROUP', as per your config file.