-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ldap3 user created is "disabled" and "password not set" by default #460
Comments
Hi, have you tried using a secure TLS connection on port 636? I know that AD usually perform such operation only on a secure transport. You must have the server properly configurated then you can just define the Server object with |
Hello cannatag, Thank you for creating this module. I have the same issue as asd78in had or still has.
but all users I have created are all have userAccountControl set to 0x222 instead of 0x220. Is any another attributes I should set ? |
I see the same behavior.. anyone knows how to enable an account using ldap3 module? |
I also could not set to 0x220 , so I ended up creating as ['66080'] |
You can check out the userAccountControl flags (512, 2) at [1] |
Just spent an afternoon getting it to work, I went through these steps
Note: Make sure the new password conforms to the AD server's password policy, or it'd be rejected Perhaps, the ldap3 docs could mention SSL is required to modify passwords on AD? |
@GitHubGeek if you followed my example above, you would have succeeded faster :) |
Hi, how can I create a new user in a sub-container, say, Users > User OU 1, tried using modify_dn to move the user after creating in the main OU
conn.result shows |
I encountered a similar issue, and ldap3 doesn't provide any error or prompt in this case. In the end, I was able to solve the problem based on this piece of code. Many thanks to @ccsalway. I'll try to summarize in order to provide assistance to others facing similar problems. Apparently, Microsoft AD domain has several prerequisites in place to prevent the creation of insecure accounts, although these prerequisites are very subtle and not easily noticeable.
In conclusion, as someone who is not particularly familiar with LDAP, having this code example has been extremely helpful. 👍🏻 |
I am am trying to create a script to create and disable users in AD using your ldap3 module.
When I create a user using the following code,
the users created using the above command are showing disabled with the attribute userAccountControl set to 546 with no password. When I try to modify the attribute to 512 to enable the user I get the error
getting the same error for
c.modify('cn=SubhasisB,ou=gssd users,dc=adldap,dc=com', {'userAccountControl': [(MODIFY_REPLACE, ['512'])]})
However if I manually create a user in the Windows server I am able to disable it by setting the userAccountControl to 514 using ldap3.
Please help me create a user who is enabled and password set .
The text was updated successfully, but these errors were encountered: