[Samba] TDB database commands (TDB used by SAMBA)

Jeremy Allison jra at samba.org
Mon Aug 17 19:36:31 UTC 2020


On Fri, Aug 14, 2020 at 08:33:33PM -0300, Suporte - KONNTROL via samba wrote:
> Background:  FREEBSD 11.2 - SAMBA 4.10.15
> 
> Hello everyone,
> Good evening/afternoon/morning.
> 
> I am trying to "reuse" the TDB database to my portal, where I want to store
> basically 3 information:
> 
> IP address , Name, TimeStamp - where IP would be the KEY and
> "NAME,TIMESTAMP" would be the VALUE.
> 
> I am using the tdbtool to insert/store data successfully (like the example
> below)
> 
> tdbtool myfile.tdb store "key1" "value1,value2,value3,value4"
> 
> The problem is when I want to READ the information back. It brings
> hexadecimal code in a strange format. (see below)
> 
> tdbtool myfile.tdb show "key1"
> 
> key 4 bytes
> key1
> data 27 bytes
> [000] 76 61 6C 75 65 31 2C 76  61 6C 75 65 32 2C 76 61  value1,v alue2,va
> [010] 6C 75 65 33 2C 76 61 6C  75 65 34                 lue3,val ue4
> 
> 
> Is there any command format/syntax to change that? Unfortunately I didn't
> find ANY documentation about it, so knowing it's part of SAMBA, I am
> wondering if someone could help me on that.

No, there's no current command to change that - tdb values
may not be printable strings I'm afraid. You could request
an enhancement via the samba bugzilla.



More information about the samba mailing list