Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to fetch "User must change password at next logon" through LDAP authentication in ADSI?

How to fetch "User must change password at next logon" through LDAP authentication in ADSI?

Scheduled Pinned Locked Moved C / C++ / MFC
questionsecurityhelptutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kushagra Tiwari
    wrote on last edited by
    #1

    Hi all, Its been long but I am back with another puzzling question... Does anybody who has worked on ADSI can help me out to read 'User must change password at next logon' using LDAP. I do know how to set the values by using 'pwdlastset' but I am not able to search for a way to read it. Can somebody throw a light on it. -Kushagra

    G K 2 Replies Last reply
    0
    • K Kushagra Tiwari

      Hi all, Its been long but I am back with another puzzling question... Does anybody who has worked on ADSI can help me out to read 'User must change password at next logon' using LDAP. I do know how to set the values by using 'pwdlastset' but I am not able to search for a way to read it. Can somebody throw a light on it. -Kushagra

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      I dont know the exact answer to your question, usually I use a tool like http://ldaptool.sourceforge.net/[^] to browse for attributes and view them, then try and read the attribute once I know what Im looking for/at If you dont have such, use that or search for [LDAP Explorer] for example 'g'

      K 1 Reply Last reply
      0
      • G Garth J Lancaster

        I dont know the exact answer to your question, usually I use a tool like http://ldaptool.sourceforge.net/[^] to browse for attributes and view them, then try and read the attribute once I know what Im looking for/at If you dont have such, use that or search for [LDAP Explorer] for example 'g'

        K Offline
        K Offline
        Kushagra Tiwari
        wrote on last edited by
        #3

        that doesnot help me out... as I am working on ADSI and using LDAP just for authentication..

        G 1 Reply Last reply
        0
        • K Kushagra Tiwari

          that doesnot help me out... as I am working on ADSI and using LDAP just for authentication..

          G Offline
          G Offline
          Garth J Lancaster
          wrote on last edited by
          #4

          ok, does the password_expired flag under the UserAccountControl flags here give you want you want ? Howto: (Almost) Everything In Active Directory via C#[^] (sorry, just realised this is c#)

          1 Reply Last reply
          0
          • K Kushagra Tiwari

            Hi all, Its been long but I am back with another puzzling question... Does anybody who has worked on ADSI can help me out to read 'User must change password at next logon' using LDAP. I do know how to set the values by using 'pwdlastset' but I am not able to search for a way to read it. Can somebody throw a light on it. -Kushagra

            K Offline
            K Offline
            Kushagra Tiwari
            wrote on last edited by
            #5

            Finally I was able to figure this stuff out... Check this out: http://msdn.microsoft.com/en-us/library/ms974598.aspx We will have to query for 'PasswordLastChanged' and if it fails with error code E_ADS_PROPERTY_NOTFOUND , then we have the password option set as 'User must change password at next logon'. Hope this helps someone in future. -Kushagra

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups