Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7753891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:10:05+00:00 2026-06-01T12:10:05+00:00

So far I was able to find users in LDAP but I don’t know

  • 0

So far I was able to find users in LDAP but I don’t know how can I enable or disable them.

As a second question, if my account has Domain Admin rights, I will be able to enable or disable account from LDAP or not?

Note: This is about a Microsoft Active Directory running on Windows 2003.

I know that I can check active uses with:

(!(useraccountcontrol:1.2.840.113556.1.4.803:=2))

Disabled useds:

(useraccountcontrol:1.2.840.113556.1.4.803:=2)

The question is how do I set the attribute in such way that it will not loose other binary flags inside.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:10:07+00:00Added an answer on June 1, 2026 at 12:10 pm

    You need to use a bit of logic here. So to disable a user, you set the disable bit (2). So:

    const long ADS_UF_ACCOUNTDISABLE = 0x00000002;
    long userAccountControl = //currentUacValue
    long newUserAccountControl = (userAccountControl | ADS_UF_ACCOUNTDISABLE);
    

    To enable an account, we need to clear the disable bit:

    long userAccountControl = //currentUacValue
    long newUserAccountControl = (userAccountControl & ~ADS_UF_ACCOUNTDISABLE)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I haven't been able to find any documentation on Android's sync services, so far
So far, I've not been able to find a solution that is able to
Where can I find a list of country-specific IP ranges for Mexico? I know
I am working on making a simple drawing program. So far I am able
So far the only way I have been able to keep index.yaml updated when
I'm learning OpenGL and SDL and so far I've been able to properly draw
streak.com is able to create a very rich experience integrated with gmail. As far
I have this so far: http://jsfiddle.net/u5vhS/54/ . What I want to be able to
I'm trying to get a better understanding than I've been able to so far...it's
long, long ago in a galaxy far far away, You used to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.