Rowland Penny
2023-May-26 13:48 UTC
[Samba] samba-tool : how to remove expiry date of an account
On 26/05/2023 14:44, Olivier BILHAUT wrote:> Thanks Rowland, > > I'll give a try to ldbmodify, even if I prefer to avoid modifying > directly ldb files. > >What do you think samba-tool does ? Using samba-tool to set expiry, ultimately does this: setexp = """ dn: %s changetype: modify replace: userAccountControl userAccountControl: %u replace: accountExpires accountExpires: %u """ % (user_dn, userAccountControl, accountExpires) self.modify_ldif(setexp) Rowland
Olivier BILHAUT
2023-May-26 13:54 UTC
[Samba] samba-tool : how to remove expiry date of an account
You're right, but it does that safely ;) Many thanks for precisions -- Oliver Le 2023-05-26 15:48, Rowland Penny via samba a ?crit :> On 26/05/2023 14:44, Olivier BILHAUT wrote: >> ThanksRowland,>> >> I'll give a try to ldbmodify, even if I prefer to avoidmodifying>> directly ldb files. >> >> > > What do you thinksamba-tool does ?> > Using samba-tool to set expiry, ultimately doesthis:> > setexp = """ > dn: %s > changetype: modify > replace:userAccountControl> userAccountControl: %u > replace: accountExpires >accountExpires: %u> """ % (user_dn, userAccountControl,accountExpires)> > self.modify_ldif(setexp) > > Rowland