Re: [Samba] Script to reset group memberships...
- Date: Wed, 4 Oct 2017 15:04:43 +0100
- From: Rowland Penny via samba <samba@xxxxxxxxxxxxxxx>
- Subject: Re: [Samba] Script to reset group memberships...
On Wed, 4 Oct 2017 15:45:07 +0200
Marco Gaiarin via samba <samba@xxxxxxxxxxxxxxx> wrote:
> I was used, for users that leave my network, to disable the account
> but also ''sanitize'' the memberships, eg reset group membership to a
> default values (normally, 'domain users').
> Clearly, using smbldap-tools in a NT domain was easy.
> How can achieve the same result in a samba AD domain? Seems that
> avaliable commands/tools (pdbedit, wbinfo, samba-tool) does not have
> this feature.
> I'v think about enumerating the user's group, eg:
> id gaio | cut -d '=' -f 4 | tr -s ',' '\n' | cut -d '(' -f 2
> | tr -d ')' | grep ^LNFFVG | cut -d '\' -f 2
> and then remove 'all but the default group', but i'm seeking feedback.
No need to do that, just use 'samba-tool user disable'
See 'samba-tool user disable --help' for more info
To unsubscribe from this list go to the following URL and read the