Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have successfully deployed AD authentication using Samba and Winbind (idmap_ad) across six Centos 6 servers and have been running happily for a few months now.

One of the servers has stopped resolving one particular username (# id username), this AD user resolves on all other servers and all other users resolve on the problem server.

I think this may be caused by a corrupt winbindd_idmap.tdb. Now, the easiest way to check this is to stop winbind dlete the file, restart samb and start winbind, then try again. My problem is that there is currently a change freeze in place and we would have to raise RFC's etc to test the theory.

My question is: Is it possible to clear the winbind cache without restarting the service?

Or if you think it's something else, please feel free to step in!


share|improve this question
up vote 7 down vote accepted

Now resolved, this worked for me:

Cleared all Winbind caches and flushed Net cache, remember to take a backup before deleting anything!

Stop the Winbind and Samba services:

service winbind stop
service smb stop

Clear the Samba Net cache:

net cache flush

Delete the Winbind caches:

rm –f /var/lib/samba/*.tdb
rm –f /var/lib/samba/group_mapping.ldb

Start the Samba and then Winbind services - Note: The order is important

service smb start
service winbind start

Test it by trying to resolve a user.

share|improve this answer
NOTE: serverfault won't let me edit the above, but the dash in the "rm -f" commands is incorrectly a Unicode dash instead of an ASCII dash. When cut and pasting, be sure to replace the dash character. – dmansfield Jul 14 at 15:52

May be net cache flush will do.

share|improve this answer
Unfortunately that didn't work. – malco Mar 26 '13 at 13:24


Change freeze now finished.

I have deleted winbindd_idmap.tdb and also winbindd_cache.tdb and restarted winbind. This has not resolved it.

Also, the server does not resolve random new users (some it does, some it doesn't). I'm having trouble figuring this out.

Can anyone help?

share|improve this answer

I might try testing the integrity of all the tdb files. There are a lot of tdb files.

The tdbbackup utility is a tool that may be used to backup samba tdb files. This tool may also be used to verify the integrity of the tdb files prior to Samba startup or during normal operation. If it finds file damage it will search for a prior backup the backup file from which the damaged tdb file will be restored. The tdbbackup utility can safely be run at any time. It was designed so that it can be used at any time to validate the integrity of tdb files, even during Samba operation.

share|improve this answer
Thanks, have installed tdb-tools and run tdbbackup -v *.tdb on the /var/lib/samba files including the secrets.tdb and get no errors. I really am stumped! – malco Mar 26 '13 at 17:00

I had to delete /var/cache/samba as well, in addition to malco's answer (on Debian and Ubuntu)

share|improve this answer

Your Answer


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.