User must change password at next logon

User must change password at next logon

Post by Adrian Cost » Sat, 05 Jan 2002 21:07:39



Hi!

    How can I know when the user must change password at next logon in C++?
The ADSI SDK only mention how to set this option (setting the property
pwdLastSet to 0).

Thanks,

Adrin

 
 
 

User must change password at next logon

Post by Jamie Vachon [MVP » Sun, 06 Jan 2002 00:29:32


The time of password expiration is the sum of the maxPwdAge property of the
domain and the pwdLastSet property of the user.

--
--------------------------------------------------------
Jamie M. Vachon
[MVP]
--------------------------------------------------------

Quote:> Hi!

>     How can I know when the user must change password at next logon in
C++?
> The ADSI SDK only mention how to set this option (setting the property
> pwdLastSet to 0).

> Thanks,

> Adrin


 
 
 

1. Changing a user password who has 'Change Password at next Logon' flagged

Hi,

I'm trying to change the password of a user using VB and ADSI with the
LDAP provider. The VB is built as a COM component and running as a
server application and has an identity set to a user account with
administrative rights.
The method call is from an ASP page where a user types in the relevant
information to change their password.

My code in brief is as below :

    strUserPath = "LDAP://" & strDomain & "/CN=" & UserName & "," &
strContainer
    Set objUser = GetObject(strUserPath)

    objUser.ChangePassword OldPassword, NewPassword

which results in the following error :

    Error Number : -2147023545 (0x80070547)

    Description : Automation error

    Configuration information could not be read from the domain
controller,     either because the machine is unavailable, or access
has been denied.

The security error that occurs on the DC is as follows :

Event Type:     Failure Audit
Event Source:   Security
Event Category: Account Logon
Event ID:       681
Date:           04/02/2003
Time:           10:12:47
User:           NT AUTHORITY\SYSTEM
Computer:       CRISDVLPDC
Description:
The logon to account: 100099
 by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
 from workstation: GBCRISS193
 failed. The error code was: 3221226020

The error code translates to User Logon with 'Change Password at Next
Logon' Flagged.

This works no problem with the WinNT provider but I have to use the
LDAP provider.

Any thoughts or suggestions are most welcome

Paul Jackson

2. OS/2 Zip Optimisation?

3. Changing User Password when set to Change at next logon

4. PGP5.0 Query: Comment field

5. user must change password at next logon want to get(retrevie)data about thisattr

6. "defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library"?

7. User Must Change Password at Next Logon

8. Sysprep - Define ComputerName with MAC address ???

9. Setting "User must change password at next logon"

10. Using ADSI to set "User must change password at next logon"

11. Getting User must change password at next logon with C#

12. change password at next logon - question

13. Change Password at Next Logon