TDBTOOL(8)

πŸ“¦
version 1.4.15+samba4.24.7 Β· 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’… TDBTOOL β€” the tdbtool(8) glow-up

okay bestie, welcome to the System Administration tools corner of the manual, where we're talking about tdbtool β€” yes, that's the one from section 8 of the man pages. buckle up πŸŽ€


✨ NAME ✨

tdbtool β€” manipulate the contents of TDB files. that's it, that's the job πŸ’–


✨ SYNOPSIS ✨

tdbtool
tdbtool [-l] TDBFILE [COMMANDS...]

✨ DESCRIPTION ✨

so this little icon is part of the samba(1) suite 🫢

tdbtool is a tool for displaying and altering the contents of Samba TDB (Trivial DataBase) files. every single command listed down below? you can type it in interactively, or you can just hand it over on the command line like the main character you are πŸ‘‘


✨ OPTIONS ✨

  • -l β€” this option disables any locking, by passing TDB_NOLOCK to tdb_open_ex(). 🚨
⚠️ only use this for database files which are not used by any other process! and also only if it is otherwise not possible to open the database β€” e.g. databases which were created with mutex locking. fr fr, read that twice πŸ’€

✨ COMMANDS ✨

the whole menu, no skips, no crumbs left behind πŸ“

  • create TDBFILE β€” create a new database named TDBFILE. baby's first tdb ✨
  • open TDBFILE β€” open an existing database named TDBFILE. come on in πŸ’œ
  • erase β€” erase the current database. poof 😭
  • dump β€” dump the current database as strings.
  • cdump β€” dump the current database as connection records.
  • keys β€” dump the current database keys as strings.
  • hexkeys β€” dump the current database keys as hex values.
  • info β€” print summary information about the current database. the vibe check πŸ“‹
  • insert KEY DATA β€” insert a record into the current database.
  • move KEY TDBFILE β€” move a record from the current database into TDBFILE.
  • store KEY DATA β€” store (replace) a record in the current database.
  • storehex KEY DATA β€” store (replace) a record in the current database where key and data are in hex format.
  • show KEY β€” show a record by key. πŸ‘€
  • delete KEY β€” delete a record by key. bye bestie πŸ’…
  • list β€” print the current database hash table and free list.
  • free β€” print the current database and free list.
  • ! COMMAND β€” execute the given system command. yes the exclamation mark is literally part of it 🫢
  • first β€” print the first record in the current database.
  • next β€” print the next record in the current database.
  • check β€” check the integrity of the current database.
  • repack β€” repack a database using a temporary file to remove fragmentation. glow-up for your file structure ✨
  • quit β€” exit tdbtool. πŸ¦‹

✨ CAVEATS ✨

the contents of the Samba TDB files are private to the implementation and should not be altered with tdbtool. 😬

bestie I'm gonna hold your hand when I say this β€” this is a real warning, not a drill. hands off the internals πŸ™ˆ

✨ VERSION ✨

this man page is correct for version 3.6 of the Samba suite.


✨ EXIT STATUS ✨

the tdbtool program returns 0 if the operation succeeded, or 1 if the operation failed. simple as that ⭐


✨ AUTHOR ✨

the original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. πŸ‘‘


πŸŽ€ cute sign-off πŸŽ€

and that's the whole page, bestie! this one's from Samba 4.0, dated 2015-04-25 β€” a lil vintage moment, but we love her anyway. go forth, open your TDBs responsibly, and don't touch the locking unless you absolutely have to. mwah πŸ’–πŸŒˆ