I got problem with Samba server with LDAP authentication backend, Samba acts as PDC, but it is not important in this case. Problem is following:
On LDAP server I have two groups per share: read only (name), read write (name-rw)
Every share has setup:
[share]
valid users = @name
read users = @name
write users = @name-rw
force group = name
Problem is simple: When I add existing user into group, Samba throws following errors into log:
user 'username' (from session setup) not permitted to access this share (share)
Sometimes there were problems with unix group membership, but this resolved logout and login on client computer.
To fix this I have to do restart of Samba but that is not possible during the day and share is in such cases required as soon as possible. Especially now the problem persist and I was forced to append user to valid users because of this issue.
Tried to google, but failed, thank you very much for any possible help.
Have you tried just reloading Samba? Debian:
/etc/init.d/samba reload
or any:pkill -SIGHUP smbd
, it won't drop any connection but will force samba to reload config.Group membership is cached too by nscd, to reload its cache do:
You may want to reaload
shadow
andpasswd
too... Restarting nscd won't make it forget cached entries.