Cleaning up the initial samba passdb.tdb

Following on from the previous receipe: Bash, looping over stdin, here is a better method:

sudo pdbedit -L | cut -f1 -d: | grep -v nic | xargs -n1  sudo pdbedit -x<a href="">

Remove all entries except for “nic”.

Technorati Tags: ,

1 Comment

  1. TheElitist Said,

    December 20, 2009 @ 10:41 am

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

RSS feed for comments on this post