[Samba] Password must change
rpenny at samba.org
Thu Apr 28 19:55:47 UTC 2016
On 28/04/16 20:30, Carlos A. P. Cunha wrote:
> What I want is to get definiri X user had the expiration date on a
> date and Y user on another date, but this date I could set.
> The date when you arrive, you have to change this password.
> When I use the command
> samba-tool user setexpiry USER - noexpiry
> it change the "Password must change: Tuesday, 19 Jan 2038 01:14:07 GMT"
> I would like to do this, so that setting the date.
> Em 28-04-2016 16:15, Rowland penny escreveu:
>> On 28/04/16 19:49, Carlos A. P. Cunha wrote:
>>> I had looked at the options, and found nothing to what I want to do ...
>>> Because of this, I tried alteranativas with "pdbedit".
>>> Any other option?
>>> Em 28-04-2016 15:09, Rowland penny escreveu:
>>>> samba-tool domain passwordsettings --help
>> OK, the users password must have expired, this means that the
>> 'pwdLastSet' attribute will now contain '0', if you want to un-expire
>> the password, you need to change this to '-1'. When the user next
>> logs in, 'pwdLastSet' will get set to the current date/time.
>> You cannot set 'pwdLastSet' to anything other than '0' or '-1'
>> Do you want to go to all the trouble of changing an attribute with
>> ldb or similar, or do what I suggested earlier ?
Ah that would be the 'UserAccountControl' attribute, your user will
probably have 512 stored in this (normal account) add 65536 (don't
expire password) to this and store the result (66048) in the attribute.
More information about the samba