Cleaning up the initial samba passdb.tdb

Following on from the previous receipe: Bash, looping over stdin, here is a better method:
[code]
sudo pdbedit -L | cut -f1 -d: | grep -v nic | xargs -n1 sudo pdbedit -x
[/code]

Remove all entries except for “nic”.

Technorati Tags: ,

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

1 comment so far

#1 TheElitist on 12.20.09 at 10:41 am

Thanks for the snippet, I tried creating my own command with xargs to get it emptied but that didn't work.

Leave a Comment