ceejtank
Posts: 2
Joined: Mon Jan 28, 2019 4:20 am

Trying to password protect shares on Samba, accessed from Windows 10

Mon Jan 28, 2019 4:45 am

I have samba running on a Pi 3B+, and I'm trying to access the shares from windows with password protection. I had it working previously with no passwords, but since I've been fiddling trying to enable password logons I've since lost that ability.

Starting info, 10.20.30.100 is my windows 10 machine I'm trying to use to access the server, hostname LAPTOP. 10.20.30.111 is the Pi, hostname BERRY. 4TB usb is mounted at /mnt/drive with the folders incoming, videos, toDownload, and torrents on it. berry is the primary user on the pi and the account I'm trying to use to log on.

Current smb.conf

Code: Select all

\\#
#======================= Global Settings =======================
[global]

workgroup = HOME
dns proxy = no
#server max protocol = SMB2
#lanman auth = yes
#ntlm auth = yes
log file = /var/log/samba/log.%m
log level = 3
max log size = 1000
panic action = /usr/share/samba/panic-action %d
server role = standalone server
;passdb backend = tdbsam
;obey pam restrictions = no
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 = no
;map to guest = never
server min protocol = SMB2

#======================= Share Definitions =======================

[homes]
comment = Home Directories
browsable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S

[incoming]
comment = NAS Incoming folder
path = /mnt/drive/incoming
browsable = no
writeable = yes
create mask = 0777
directory mask = 0777
public = yes
#valid users = berry
#force user = berry

[videos]
comment = NAS Videos folder
path = /mnt/drive/videos
browsable = yes
writeable = yes
create mask = 0777
directory mask = 0777
valid users = berry

[torrents]
comment = NAS Torrents folder
path = /mnt/drive/torrents
browsable = yes
writeable = yes
create mask = 0777
directory mask = 0777
valid users = berry

[torBox]
comment = NAS toDownload folder
path = /mnt/drive/toDownload
browsable = no
writeable = yes
create mask = 0777
directory mask = 0777
valid users = berry
And here is the /var/log/samba/log.10.20.30.100 for my latest connection attempt. It's what it always looks like though. It's too long for a post so I put it in pastebin. It seems to repeat itself a few times and the main thing I see is NT_STATUS_WRONG_PASSWORD but I've confirmed multiple times that the password I'm typing into windows is the same as the one I set on the pi using smbpasswd and just plain passwd.
https://pastebin.com/eRriA9pC

hortimech
Posts: 431
Joined: Wed Apr 08, 2015 5:52 pm

Re: Trying to password protect shares on Samba, accessed from Windows 10

Mon Jan 28, 2019 11:21 am

Does the user 'berry' exist as a user in /etc/passwd on the rpi ?
Did you add a Samba user with 'smbpasswd -a berry' ?
You would have had to do the above with 'root' permissions.

Try your smb.conf like this:

Code: Select all


[global]

workgroup = HOME
dns proxy = no
log file = /var/log/samba/log.%m
log level = 3
max log size = 1000
panic action = /usr/share/samba/panic-action %d
server role = standalone server
security = user
unix password sync = yes

[homes]
comment = Home Directories
browsable = no
create mask = 0700
directory mask = 0700
valid users = %S

[incoming]
comment = NAS Incoming folder
path = /mnt/drive/incoming
browsable = no
read only = no

[videos]
comment = NAS Videos folder
path = /mnt/drive/videos
read only = no
valid users = berry

[torrents]
comment = NAS Torrents folder
path = /mnt/drive/torrents
read only = no
valid users = berry

[torBox]
comment = NAS toDownload folder
path = /mnt/drive/toDownload
browsable = no
read only = no
valid users = berry

For more info, see here:

https://wiki.samba.org/index.php/Settin ... one_Server

ceejtank
Posts: 2
Joined: Mon Jan 28, 2019 4:20 am

Re: Trying to password protect shares on Samba, accessed from Windows 10

Mon Jan 28, 2019 7:45 pm

Yes, berry is my main user on the pi and I've done smbpasswd with it. I'll try that .conf when I get home from work.

Return to “Troubleshooting”