4.27.2011

Update Samba idmap

Environment:
OS: CentOS 5.2
Samba: 3.5.9-44
  1. Backup you old idmap data "net idmap dump /var/lib/samba/winbindd_idmap.tdb > /root/idmap-backup.txt" (please clarify your idmap location, you can use this command "locate winbindd_idmap.tdb") 
  2. Use vi or nano to modify your idmap data.
  3. remove all files inside /var/lib/samba/ ("rm -fr /var/lib/samba")
  4. restart winbind ("/etc/init.d/winbind restart")
  5. import new imap data to tdb file "cat /root/idmap-backup.txt | net idmap restore"
  6. Update System Info "getent passwd", "getent group"
To verify the new winbind_idmap db please dump the tdb file again (step 1) to check the data.