Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
No idea, but I see the same behaviour. I would love to know the answer. I can only assume that samba caches the group lookup somewhere, but I've never figured out how to flush it or stop it from doing so. –  David Pashley Oct 7 '09 at 13:09

1 Answer 1

up vote 1 down vote accepted

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:

nscd -i group

You may want to reaload shadow and passwd too... Restarting nscd won't make it forget cached entries.

share|improve this answer
    
I forgot to reply on it before, this is exactly the way how to fix it. Thanks anyway. –  amsys Sep 30 '10 at 7:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.