Skip to content
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

set password problem - DSID-031A126C, problem 5003 #1157

Open
mowglis opened this issue Aug 28, 2024 · 4 comments
Open

set password problem - DSID-031A126C, problem 5003 #1157

mowglis opened this issue Aug 28, 2024 · 4 comments

Comments

@mowglis
Copy link

mowglis commented Aug 28, 2024

Hi,
after succesfly ceated user:

attributes={
'objectClass': ['top', 'person', 'organizationalPerson', 'user'],
'cn': f'{first_name} {last_name}',
'givenName': first_name,
'sn': last_name,
'sAMAccountName': username,
'userPrincipalName': f'{username}@{self.ad_domain}',
'displayName': f'{first_name} {last_name}',
'homeDirectory': home_directory,
'homeDrive': home_drive,
'profilePath': profile_path,
'mail': user_email
}
conn.add(user_dn, attributes=attributes)

I try set password and unlock account with this commands:

Update password

conn.extend.microsoft.unlock_account(user=user_dn)
conn.extend.microsoft.modify_password(user_dn, password)
conn.modify(user_dn, changes={"userAccountControl": (MODIFY_REPLACE, [512])})

I recive this error:
{
'result': 53,
'description': 'unwillingToPerform',
'dn': '',
'message': '0000052D: SvcErr: DSID-031A126C, problem 5003 (WILL_NOT_PERFORM), data 0\n\x00',
'referrals': None,
'type': 'modifyResponse'
}
AD server is Windows 2019.... Please, can You help me, where is problem to set password? Thanks.

@cannatag
Copy link
Owner

cannatag commented Aug 28, 2024 via email

@mowglis
Copy link
Author

mowglis commented Aug 28, 2024

Hi. Are using a secure connection to the server? It won’t accept a modify password operation on a cleartext connection.

Yes, good question..... not. My connection is create with this commands:

ad_server = 'dc01.ad.gybon.cz'
server = Server(ad_server, get_info=ALL, use_ssl=False)

This is not secure, I think.... But with use_ssl=True, I got error:
ldap3.core.exceptions.LDAPSocketSendError: socket sending error[Errno 104] Connection reset by peer

@cannatag
Copy link
Owner

cannatag commented Aug 28, 2024 via email

@mowglis
Copy link
Author

mowglis commented Aug 29, 2024

Thanks for your help, my problem will be in SSL communication with AD server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants