On Fri, 2021-09-17 at 14:24 +0100, miguel medalha wrote:> > Always possible, but not knowing the code, who knows ?
> > There are a few ways of determining if/when a users password
> > expires:
> > There is the ms-DS-User-Password-Expired attribute, but this isn't
> > available to Samba.
> > There is the msDS-UserPasswordExpiryTimeComputed attribute, but
> > again
> > this isn't available.
> > Finally there is the maxPwdAge attribute, this, along with the
> > users
> > pwdLastSet attribute, can be used to calculate when the password
> > expires. However, if the maxPwdAge attribute doesn't exist or is
> > set to
> > '0' , then no password should expire, so there should be no
reason
> > to
> > calculate when the password expires.
>
> From a Windows elevated command prompt, you can use the following:
>
> net user [username] /domain
>
> Here's an example output:
>
> User name john.doe
> Full Name John Doe
> Comment Account for administering the computer/domain
> User's comment
> Country code 000 (System Default)
> Account active Yes
> Account expires Never
> Password last set 2021-08-06 09:04:18
> Password expires 2021-12-04 09:04:18
> Password changeable 2021-08-06 09:04:18
> Password required Yes
> User may change password Yes
> Workstations allowed All
> Logon script
> User profile
> Home directory
> Last logon 2021-09-01 08:07:25
> Logon hours allowed All
> Local Group Memberships *Administrators *HomeUsers
> Global Group memberships *None
>
You can get something similar with:
pdbedit -u USERNAME -w -v
Rowland