Frequently Asked Questions

From SambaWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

What are tdb files?

 Answered by Jerry Carter on samba@lists.samba.org
 [1]

Samba uses a lightweight database called Trivial Database (tdb). Here's the list (john, we should really document this somewhere).
(*) information persistent across restarts (but not necessarily important to backup).

session information (e.g. support for 'utmp = yes')
account_policy.tdb*NT account policy settings such as pw expiration, etc...
brlock.tdbbyte range locks
browse.datbrowse lists
connections.tdbshare connections (used to enforce max connections, etc...)
gencache.tdbgeneric caching db
group_mapping.tdb*group mapping information
lang_en.tdbLanguage encodings (i think).
locking.tdbshare modes & oplocks
login_cache.tdb*bad pw attempts
messages.tdbSamba messaging system
netsamlogon_cache.tdb*cache of user net_info_3 struct from net_samlogon() request (as a domain member)
ntdrivers.tdb*installed printer drivers
ntforms.tdb*installed printer forms
ntprinters.tdb*installed printer information
printing/directory containing tdb per print queue of cached lpq output
registry.tdbWindows registry skeleton (connect via regedit.exe)
sessionid.tdb
share_info.tdb*share acls
unexpected.tdbunexpected packet queue needed to support windows clients that respond on a difference port that the originating request) (i could be wrong on this one).
winbindd_cache.tdbwinbindd's cache of user lists, etc...
winbindd_idmap.tdb*winbindd's local idmap db
wins.dat*wins database when 'wins support = yes'

The following tdb's should be backed up IMO:
  nt*.tdb   account_policy.tdb   group_mapping.tdb   share_info.tdb   winbindd_idmap.tdb

vfs - An example for a recycle container on a samba share

vfs objects =  recycle
      recycle:keeptree = yes
      recycle:versions = yes
      recycle:touch = yes
      recycle:exclude = ?~$*,~$*,*.tmp,index*.pl,index*.htm*,*.temp,*.TMP
      recycle:exclude_dir=  /tmp,/temp,/cache
      recycle:repository = .recycle/.recycle.%u
      recycle:noversions = *.doc,*.xls,*.ppt
      #hide files = /.recycle.*/.recycle/
      #veto files = /.recycle.*/.recycle/

inherit permissions

Use the UNIX form of setgid to make all files and subdirectories belong to the enclosing group.

Example...

the root directory for a samba share [root@srv1 home]# ls -ld /home/storage drwxrwxr-x 47 root dom_users 4096 Jan 31 08:09 /home/storage

change the directory so all files & subdirectories created will belong to 'dom_users' group [root@srv1 home]# chmod g+s /home/storage

verify the results [root@srv1 home]# ls -ld /home/storage drwxrwsr-x 47 root dom_users 4096 Jan 31 08:09 /home/storage

guest access