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

Failed to add an AD user with special char in name #6722

Closed
DavidePrincipi opened this issue Nov 24, 2022 · 5 comments
Closed

Failed to add an AD user with special char in name #6722

DavidePrincipi opened this issue Nov 24, 2022 · 5 comments
Labels
bug A defect of the software verified All test cases were verified successfully

Comments

@DavidePrincipi
Copy link
Member

DavidePrincipi commented Nov 24, 2022

When adding a user testuser1 with full name Janis Žvīgurs the user-create event fails.

Steps to reproduce

  • System is configured with a local AD accounts provider, recently updated from Samba DC 4.9 to Samba DC 4.16, OR System is freshly installed with Samba AD 4.16
  • In System > Users & Groups > Create User
  • Use special chars in the Name field

Expected behavior

The new user is created

Actual behavior

Creation fails. In /var/log/messages:

unable to import element 'givenName'

Event log excerpt

Nov 23 13:08:26 server esmith::event[18956]: Event: user-create testuser1 Janis Žvīgurs /usr/libexec/openssh/sftp-server
Nov 23 13:08:26 server esmith::event[18956]: ERROR(<class 'TypeError'>): Failed to add user 'testuser1':  - unable to import element 'givenName'
Nov 23 13:08:26 server esmith::event[18956]:  File "/usr/lib64/python3.6/site-packages/samba/netcmd/user.py", line 374, in run
Nov 23 13:08:26 server esmith::event[18956]:    smartcard_required=smartcard_required)
Nov 23 13:08:26 server esmith::event[18956]:  File "/usr/lib64/python3.6/site-packages/samba/samdb.py", line 640, in newuser
Nov 23 13:08:26 server esmith::event[18956]:    self.add(ldbmessage)
Nov 23 13:08:26 server esmith::event[18956]: [ERROR] User testuser1 creation failed
Nov 23 13:08:26 server esmith::event[18956]: Action: /etc/e-smith/events/user-create/S40nethserver-dc-user-create FAILED: 255 [0.431201]
Nov 23 13:08:27 server esmith::event[18956]: Action: /etc/e-smith/events/user-create/S50nethserver-dc-sync-upn SUCCESS [0.478135]
Nov 23 13:08:27 server esmith::event[18956]: [NOTICE] clearing sssd cache for user testuser1@gymn.local
Nov 23 13:08:27 server esmith::event[18956]: No cache object matched the specified search
Nov 23 13:08:27 server esmith::event[18956]: No cache object matched the specified search
Nov 23 13:08:27 server esmith::event[18956]: Action: /etc/e-smith/events/user-create/S90nethserver-sssd-clear-cache SUCCESS [0.017727]
Nov 23 13:08:27 server esmith::event[18956]: Event: user-create FAILED

Components

  • nethserver-dc-1.9.0-1.ns7.x86_64
  • nethserver-sssd-1.7.1-1.ns7.noarch

See also


Thanks to kellerman for reporting the bug, @nrauso for reproducing it on a new installation

@DavidePrincipi DavidePrincipi added the bug A defect of the software label Nov 24, 2022
@DavidePrincipi DavidePrincipi self-assigned this Nov 24, 2022
@DavidePrincipi
Copy link
Member Author

  • The error is not reproducible on Samba Version 4.16.4-Ubuntu with Python 3.10. The issue could originate from the NSDC deps bundle which installs Python 3.6 instead.
  • The latest Python release available for NSDC from official repositories is 3.8.

DavidePrincipi added a commit to NethServer/nethserver-dc that referenced this issue Nov 28, 2022
Since Samba DC 4.16 upgrade, "samba-tool user create" fails if the
"--given-name" option value contains diacritics. As pdbedit still works,
change the full name value with it, as the user-modify event already
does.

NethServer/dev#6722
@nethbot
Copy link
Member

nethbot commented Nov 28, 2022

in 7.9.2009/testing:

  • nethserver-dc-1.9.0-1.1.g4cfb930.ns7.x86_64.rpm x86_64

@DavidePrincipi
Copy link
Member Author

DavidePrincipi commented Nov 28, 2022

Test case

Check the bug is not reproducible

@DavidePrincipi DavidePrincipi removed their assignment Nov 28, 2022
@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Nov 28, 2022
@nrauso nrauso self-assigned this Nov 28, 2022
@nrauso
Copy link

nrauso commented Nov 28, 2022

Tested both on fresh installation and in case of update: verfied

@nrauso nrauso added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Nov 28, 2022
@nrauso nrauso removed their assignment Nov 28, 2022
@nethbot
Copy link
Member

nethbot commented Nov 28, 2022

in 7.9.2009/updates:

  • nethserver-dc-1.9.1-1.ns7.x86_64.rpm x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect of the software verified All test cases were verified successfully
Projects
None yet
Development

No branches or pull requests

3 participants