[Samba] samba-tool : how to remove expiry date of an account
Rowland Penny
rpenny at samba.org
Fri May 26 13:48:56 UTC 2023
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
More information about the samba
mailing list