Re: Password Expiration

From: Michel Gallant (MVP) (neutron@istar.ca)
Date: 10/30/02


Date: Wed, 30 Oct 2002 14:57:38 -0500
From: "Michel Gallant (MVP)" <neutron@istar.ca>


WSH/vbscript solution:

From: Michael Harris (Please.Respond@To.NewsGroup)
 Subject: Re: ADSI to check password expiration
 Newsgroups: microsoft.public.scripting.wsh
 Date: 1999/09/23

Set oUser = GetObject("WinNT://" & "domainname/username" & ",USER")

vExpireDays = DateDiff("d",Now(),CDate(oUser.PasswordExpirationDate))

msgbox "Name: " & oUser.Name & vbCrLf
      & "FullName: " & oUser.FullName & vbCrLf
      & "Password Expiration Date: "
      & oUser.PasswordExpirationDate & vbCrLf
      & "Password expires in " & vExpireDays & " days"

- Michel Gallant
   MVP Security
   http://home.istar.ca/~neutron

TwistedPair wrote:

> Hi,
> Is there a way to tell how long before a user's password will expire, or how
> long it has expired?
>
> Thanks
> Pair



Relevant Pages

  • Re: Password Expiration on 5.2
    ... dissemination or other use of, or taking of any action in reliance upon, this ... "Weeks between password EXPIRATION and LOCKOUT" means that after a password ... I am trying to setup all user to have their password expire every 30 ... retransmission, dissemination or other use of, or taking ...
    (AIX-L)
  • Re: Password never expires-cant force user to change password
    ... Password policy on the domain for domain users is all or nothing. ... You want to implement a new password expiration policy. ... > Expire your departments manually. ... I'm just not a very good script writer and am not very confident. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Active Directory Expiration Notification
    ... message to the user that their password is about to expire. ... that value in the security policy via the "Prompt user to change password ... Password expiration is determined by the domain password expiration ... Joe Kaplan-MS MVP Directory Services Programming ...
    (microsoft.public.windows.server.active_directory)
  • Re: Password never expires-cant force user to change password
    ... The mechanism for forcing a user to change password is a password expiration. ... require a new password UNLESS the account is set to never expire. ... Joe Richards Microsoft MVP Windows Server Directory Services ...
    (microsoft.public.windows.server.active_directory)
  • Re: Password Expiration on 5.2
    ... You want the MAX. AGE parameter. ... "Weeks between password EXPIRATION and LOCKOUT" means that after a password ... I am trying to setup all user to have their password expire every 30 days. ...
    (AIX-L)