I would like to have a few samba shares. Some of them should be available to everybody (this is already working) and some of them should be protected with a password (and username). For the password protected folders I created a new user, gave him a samba password and wrote his name under valid users = in my share. These were the commands:
useradd joe
passwd joe
smbpasswd -a joe
valid users = vivek raj joe
I followed this little guide: Samba Add a User. But it looks like it's not working, Windows 7 always tells me that the password is wrong.
Here is my samba config file:
[global]
server string = bananapi
workgroup = WORKGROUP
netbios name = %h
security = user
guest account = root
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
smb ports = 445
max protocol = SMB2
min receivefile size = 16384
deadtime = 30
os level = 20
mangled names = no
syslog only = yes
syslog = 2
name resolve order = lmhosts wins bcast host
preferred master = auto
domain master = auto
local master = yes
printcap name = /dev/null
load printers = no
browseable = yes
writeable = yes
printable = no
encrypt passwords = true
enable core files = no
passdb backend = smbpasswd
smb encrypt = disabled
use sendfile = yes
# Using the following configurations as a template allows you to add
# writable shares of disks and paths under /storage
[Share]
path = /storage/share
available = yes
browsable = yes
public = yes
writable = yes
root preexec = mkdir -p /storage/share
[username]
path = /storage/username
available = yes
browsable = yes
public = no
writable = yes
valid users = joe
root preexec = mkdir -p /storage/username
valid users
line. If it's in your samba config file, edit the file to show it.valid users = username
. We need to see exactly what you have in your file.