[Samba] CTDB - deleting database entries
Michael Adam
obnox at samba.org
Wed Dec 12 07:47:49 MST 2012
Hi,
I assume that you are using Samba 3.6 (or newer)?!
In Samba 3.6, we have removed the ability to act on the id
mapping database through winbindd via wbinfo.
Instead, the "net idmap" command can be used:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ bin/net idmap
Invalid command: net idmap
Usage:
net idmap dump Dump the current ID mappings
net idmap restore Restore entries from stdin
net idmap setmap Not implemented yet
net idmap delete Delete ID mapping
net idmap secret Set secret for specified domain
net idmap aclmapset Set acl map
net idmap check Check id mappings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For your purpose, "net idmap delete" would be the tool of choice.
Björn's hint to the general purpose dbwrap_tool is of course
also valuable.
Cheers - Michael
On 2012-12-12 at 11:16 +0000, Orlando Richards wrote:
> On 12/12/12 09:00, Orlando Richards wrote:
> >On 11/12/12 10:17, Bjoern Baumbach wrote:
> >>Hi Orlando!
> >>
> >>On 12/10/2012 04:01 PM, Orlando Richards wrote:
> >>>Is there any way to remove entries in a CTDB cluster once they have been
> >>>created, short of shutting down all nodes, editing each tdb manually,
> >>>then starting them back up?
> >>
> >>Yes! You can use the undocumented dbwrap_tool.
> >>
> >>USAGE: dbwrap_tool <database> <op> [<key> [<type> [<value>]]]
> >> ops: fetch, store, delete, erase, listkeys, listwatchers
> >> types: int32, uint32, string, hex
> >>
> >>Example:
> >># list all the keys
> >>dbwrap_tool yourdb.tdb listkeys
> >>
> >># remove the record by key
> >>dbwrap_tool yourdb.tdb delete "name of the key"
> >>
> >>Best regards
> >>Björn
> >>
> >
> >Excellent - thanks Bjoern, I'll give that a go.
>
> Worked perfectly - though I had to rebuild the sernet src rpm to get the
> binaries, since they're not included in the rpm packages you guys build
> (btw - thanks again for providing them!), but that was easy enough.
>
> I also had slight confusion because the "listkeys" will spit out
> "S-12345...-1234/00" and "GID 12345/00" - and it took me a while to
> realise that I had to drop the "/00" part when calling the "delete".
>
> Thanks again Björn - and everyone at Sernet :)
>
>
> --
> --
> Dr Orlando Richards
> Information Services
> IT Infrastructure Division
> Unix Section
> Tel: 0131 650 4994
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba/attachments/20121212/aa84336f/attachment.pgp>
More information about the samba
mailing list