Error when I create a new user

NethServer Version: NethServer release 7.4.1708
Module: Local Samba 4 Active Directory Domain Controller

When I create a new user, it appears on the console "Task completed with errors
# (exit status) "

The user is created.

the error also occurs when modifying a user.

1 Like

hi
maybe its related

2 Likes

Please take a look at /var/log/messages and report the relevant part.

You should be able to identify a user-create event.

1 Like

Feb 6 17:37:38 bi esmith::event[29141]: User ‘nuevo’ created successfully
Feb 6 17:37:38 bi esmith::event[29141]: Action: /etc/e-smith/events/user-create/S40nethserver-dc-user-create SUCCESS [0.445615]
Feb 6 17:37:38 bi esmith::event[29141]: Failed to get machine PTY: No such file or directory
Feb 6 17:37:38 bi esmith::event[29141]: [ERROR] failed to modify UPN suffixes
Feb 6 17:37:38 bi esmith::event[29141]: Action: /etc/e-smith/events/user-create/S50nethserver-dc-sync-upn FAILED: 1 [0.207454]
Feb 6 17:37:38 bi esmith::event[29141]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.045446]
Feb 6 17:37:38 bi esmith::event[29141]: [NOTICE] clearing sssd cache for user nuevo@insatek.lan
Feb 6 17:37:38 bi esmith::event[29141]: No cache object matched the specified search
Feb 6 17:37:38 bi esmith::event[29141]: No cache object matched the specified search
Feb 6 17:37:38 bi esmith::event[29141]: Action: /etc/e-smith/events/user-create/S90nethserver-sssd-clear-cache SUCCESS [0.014958]
Feb 6 17:37:38 bi esmith::event[29141]: Event: user-create FAILED
Feb 6 17:37:39 bi esmith::event[29170]: Event: password-policy-update nuevo no
Feb 6 17:37:39 bi esmith::event[29170]: [NOTICE] clearing sssd cache for user nuevo@insatek.lan
Feb 6 17:37:39 bi esmith::event[29170]: No cache object matched the specified search
Feb 6 17:37:39 bi esmith::event[29170]: No cache object matched the specified search
Feb 6 17:37:39 bi esmith::event[29170]: Action: /etc/e-smith/events/password-policy-update/S10nethserver-sssd-clear-cache SUCCESS [0.015044]
Feb 6 17:37:39 bi esmith::event[29170]: Expiry for user ‘nuevo’ disabled.
Feb 6 17:37:39 bi esmith::event[29170]: Action: /etc/e-smith/events/password-policy-update/S30nethserver-dc-password-policy SUCCESS [0.480338]
Feb 6 17:37:39 bi esmith::event[29170]: Event: password-policy-update SUCCESS
Feb 6 17:37:39 bi esmith::event[29189]: Event: password-modify nuevo@insatek.lan /tmp/ng-iTNiiU
Feb 6 17:37:39 bi esmith::event[29189]: Action: /etc/e-smith/events/password-modify/S25password-set SUCCESS [0.00292]
Feb 6 17:37:39 bi esmith::event[29189]: spawn /usr/bin/systemd-run -M nsdc -q -t /usr/bin/samba-tool user setpassword nuevo
Feb 6 17:37:39 bi esmith::event[29189]: New Password:
Feb 6 17:37:39 bi esmith::event[29189]: Retype Password:
Feb 6 17:37:40 bi esmith::event[29189]: Changed password OK
Feb 6 17:37:40 bi esmith::event[29189]: Action: /etc/e-smith/events/password-modify/S30nethserver-dc-password-set SUCCESS [0.409286]
Feb 6 17:37:40 bi esmith::event[29189]: Enabled user 'nuevo’
Feb 6 17:37:40 bi esmith::event[29189]: Action: /etc/e-smith/events/password-modify/S40nethserver-dc-user-unlock SUCCESS [0.254785]
Feb 6 17:37:40 bi esmith::event[29189]: Action: /etc/e-smith/events/password-modify/S90password-cleanup SUCCESS [0.16796]
Feb 6 17:37:40 bi esmith::event[29189]: Event: password-modify SUCCESS

You probably have an open session to nsdc container.

Verify it with:

loginctl

and:

systemctl status

Then, terminate relevant root session:

loginctl kill-session <id>

If you want to terminate all root sessions:

loginctl terminate-user root

Then, you can try to recreate the user.

1 Like

After -loginctl terminate-user root- the same problem.

I restart the machine and the same.

I have deleted the users created since the problem occurred.

Now it seems all right to create and modify.

I just experienced the same issue on a fresh install too, with the same log entries as aove. I deleted the user too and tried to recreate it but the same error happened again. Tried to create different user for test, that worked fine after.

Blockquote[root@ms ~]# loginctl
SESSION UID USER SEAT
1 0 root

1 sessions listed.
[root@ms ~]# systemctl status
domainhere.com
State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Tue 2018-02-06 21:02:53 GMT; 6min ago
CGroup: /
├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 2
├─user.slice
│ └─user-0.slice
│ └─session-1.scope
│ ├─2695 sshd: root@pts/0
│ ├─2698 -bash
│ ├─2719 systemctl status
│ └─2720 less
├─machine.slice
│ └─nsdc.service
│ ├─1373 /usr/bin/systemd-nspawn --quiet --keep-unit --boot --netwo
│ ├─1381 /usr/lib/systemd/systemd
│ └─system.slice
│ ├─console-getty.service
│ │ └─2256 /sbin/agetty --noclear --keep-baud console 115200 3840
│ ├─samba.service
│ │ ├─2255 /usr/sbin/samba -i --debug-stderr
lines 1-23…skipping…
domainhere.com
State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Tue 2018-02-06 21:02:53 GMT; 6min ago
CGroup: /
├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 21
├─user.slice
│ └─user-0.slice
│ └─session-1.scope
│ ├─2695 sshd: root@pts/0
│ ├─2698 -bash
│ ├─2719 systemctl status
│ └─2720 less
├─machine.slice
│ └─nsdc.service
│ ├─1373 /usr/bin/systemd-nspawn --quiet --keep-unit --boot --network-bridge=br0 --machine=nsdc --capability=CAP_SYS_TIME
│ ├─1381 /usr/lib/systemd/systemd
│ └─system.slice
│ ├─console-getty.service
│ │ └─2256 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220
│ ├─samba.service
│ │ ├─2255 /usr/sbin/samba -i --debug-stderr
│ │ ├─2343 /usr/sbin/samba -i --debug-stderr
│ │ ├─2344 /usr/sbin/samba -i --debug-stderr
│ │ ├─2345 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground
│ │ ├─2346 /usr/sbin/samba -i --debug-stderr
│ │ ├─2347 /usr/sbin/samba -i --debug-stderr
│ │ ├─2348 /usr/sbin/samba -i --debug-stderr
│ │ ├─2349 /usr/sbin/samba -i --debug-stderr
│ │ ├─2350 /usr/sbin/samba -i --debug-stderr
│ │ ├─2351 /usr/sbin/samba -i --debug-stderr
│ │ ├─2352 /usr/sbin/samba -i --debug-stderr
│ │ ├─2353 /usr/sbin/samba -i --debug-stderr
│ │ ├─2354 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground
│ │ ├─2355 /usr/sbin/samba -i --debug-stderr
│ │ ├─2356 /usr/sbin/samba -i --debug-stderr
│ │ ├─2357 /usr/sbin/samba -i --debug-stderr
│ │ ├─2362 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground
│ │ ├─2363 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground
│ │ ├─2365 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground
│ │ └─2366 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground
│ ├─dbus.service
│ │ └─2226 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

Blockquote

After creating the 4th user the issue is back, and it seems no to go away. Any suggestions?

Hi, I have the sam issue, is it already resolved?

Fix merged upstream, but still no package released

https://bugzilla.redhat.com/show_bug.cgi?id=1533595

Thanks for Your reply but I can’t get it how to fix this temporary until we have a package for this?

There are two problems with the systemd bus

  • Unicode chars may break it - do not use Unicode in user full names until the upstream fix has been released
  • Hanging sessions that steal terminals - Follow detailed instructions above or just reboot

Sadly, i don’t get it still:

  1. I terminate root session (was connected from webvirt)
  2. i try create user: z@mydomain.com with user full name: z
    still get webgui error and /messages :
    [ERROR] failed to modify UPN suffixes

    Event: user-create FAILED

edit:
what is weird that i can login into nextcloud as that user
what’s wrong?

I am having same issue, additionally I have to use DOMAIN\user to map network drive on windows for newly created users.

Thanks

I have the same problem. Has anyone solved?

I add that the user is created, I can modify it and delete it. In SOGo, however, the user is not called test@domain.local but test@ad.domain.local and the emails are not delivered. For reading I have to use roundcube.

thanks

Same problem here. I think I used some non-utf 8 characters for some users. I have already changed them but the problem still persists even for new users. Is there any way to manually fix it? Which part of the user creation process is affected?

Best regards

I would like to point out that I tried to disable strong password policy and it works.

Best regards

1 Like

Hi!

I tried disabling strong password but still receiving the error for new users:

May 7 12:17:17 nethserver esmith::event[13548]: Event: user-create test5 Test5 /usr/libexec/openssh/sftp-server
May 7 12:17:18 nethserver esmith::event[13548]: User ‘test5’ created successfully
May 7 12:17:18 nethserver esmith::event[13548]: Action: /etc/e-smith/events/user-create/S40nethserver-dc-user-create SUCCESS [0.255038]
May 7 12:17:18 nethserver esmith::event[13548]: Failed to get machine PTY: No such file or directory
May 7 12:17:18 nethserver esmith::event[13548]: [ERROR] failed to modify UPN suffixes
May 7 12:17:18 nethserver esmith::event[13548]: Action: /etc/e-smith/events/user-create/S50nethserver-dc-sync-upn FAILED: 1 [0.185925]
May 7 12:17:18 nethserver esmith::event[13548]: [NOTICE] clearing sssd cache for user test5@mydomain.lan
May 7 12:17:18 nethserver esmith::event[13548]: No cache object matched the specified search
May 7 12:17:18 nethserver esmith::event[13548]: No cache object matched the specified search
May 7 12:17:18 nethserver esmith::event[13548]: Action: /etc/e-smith/events/user-create/S90nethserver-sssd-clear-cache SUCCESS [0.013319]
May 7 12:17:18 nethserver esmith::event[13548]: Event: user-create FAILED
May 7 12:17:18 nethserver esmith::event[13578]: Event: password-policy-update test5 no
May 7 12:17:18 nethserver esmith::event[13578]: [NOTICE] clearing sssd cache for user test5@mydomain.lan
May 7 12:17:18 nethserver esmith::event[13578]: No cache object matched the specified search
May 7 12:17:18 nethserver esmith::event[13578]: No cache object matched the specified search
May 7 12:17:18 nethserver esmith::event[13578]: Action: /etc/e-smith/events/password-policy-update/S10nethserver-sssd-clear-cache SUCCESS [0.013556]
May 7 12:17:18 nethserver esmith::event[13578]: Expiry for user ‘test5’ disabled.
May 7 12:17:18 nethserver esmith::event[13578]: Action: /etc/e-smith/events/password-policy-update/S30nethserver-dc-password-policy SUCCESS [0.305028]
May 7 12:17:18 nethserver esmith::event[13578]: Event: password-policy-update SUCCESS
May 7 12:17:18 nethserver esmith::event[13597]: Event: password-modify test5@mydomain.lan /tmp/ng-m8UHyR
May 7 12:17:18 nethserver esmith::event[13597]: Action: /etc/e-smith/events/password-modify/S25password-set SUCCESS [0.002647]
May 7 12:17:18 nethserver esmith::event[13597]: spawn /usr/bin/systemd-run -M nsdc -q -t /usr/bin/samba-tool user setpassword test5
May 7 12:17:18 nethserver esmith::event[13597]: New Password:
May 7 12:17:18 nethserver esmith::event[13597]: Retype Password:
May 7 12:17:19 nethserver esmith::event[13597]: Changed password OK
May 7 12:17:19 nethserver esmith::event[13597]: Action: /etc/e-smith/events/password-modify/S30nethserver-dc-password-set SUCCESS [0.231917]
May 7 12:17:19 nethserver esmith::event[13597]: Enabled user 'test5’
May 7 12:17:19 nethserver esmith::event[13597]: Action: /etc/e-smith/events/password-modify/S40nethserver-dc-user-unlock SUCCESS [0.209573]
May 7 12:17:19 nethserver esmith::event[13597]: Action: /etc/e-smith/events/password-modify/S90password-cleanup SUCCESS [0.003984]
May 7 12:17:19 nethserver esmith::event[13597]: Event: password-modify SUCCESS

Then I found an old thread about one of the errors in the log Failet to get machine PTY: No such file or directory so I tested running a SSH session while creating new users in the GUI and… everything is working fine now:

May 7 12:35:07 nethserver esmith::event[14030]: Event: user-create test7 Test7 /usr/libexec/openssh/sftp-server
May 7 12:35:07 nethserver esmith::event[14030]: User ‘test7’ created successfully
May 7 12:35:07 nethserver esmith::event[14030]: Action: /etc/e-smith/events/user-create/S40nethserver-dc-user-create SUCCESS [0.255073]
May 7 12:35:07 nethserver esmith::event[14030]: Action: /etc/e-smith/events/user-create/S50nethserver-dc-sync-upn SUCCESS [0.283695]
May 7 12:35:07 nethserver esmith::event[14030]: [NOTICE] clearing sssd cache for user test7@mydomain.lan
May 7 12:35:07 nethserver esmith::event[14030]: No cache object matched the specified search
May 7 12:35:07 nethserver esmith::event[14030]: No cache object matched the specified search
May 7 12:35:07 nethserver esmith::event[14030]: Action: /etc/e-smith/events/user-create/S90nethserver-sssd-clear-cache SUCCESS [0.012828]
May 7 12:35:07 nethserver esmith::event[14030]: Event: user-create SUCCESS
May 7 12:35:07 nethserver esmith::event[14063]: Event: password-policy-update test7 no
May 7 12:35:07 nethserver esmith::event[14063]: [NOTICE] clearing sssd cache for user test7@mydomain.lan
May 7 12:35:07 nethserver esmith::event[14063]: No cache object matched the specified search
May 7 12:35:07 nethserver esmith::event[14063]: No cache object matched the specified search
May 7 12:35:07 nethserver esmith::event[14063]: Action: /etc/e-smith/events/password-policy-update/S10nethserver-sssd-clear-cache SUCCESS [0.013374]
May 7 12:35:08 nethserver esmith::event[14063]: Expiry for user ‘test7’ disabled.
May 7 12:35:08 nethserver esmith::event[14063]: Action: /etc/e-smith/events/password-policy-update/S30nethserver-dc-password-policy SUCCESS [0.295131]
May 7 12:35:08 nethserver esmith::event[14063]: Event: password-policy-update SUCCESS
May 7 12:35:08 nethserver esmith::event[14082]: Event: password-modify test7@mydomain.lan /tmp/ng-JmsW8c
May 7 12:35:08 nethserver esmith::event[14082]: Action: /etc/e-smith/events/password-modify/S25password-set SUCCESS [0.002689]
May 7 12:35:08 nethserver esmith::event[14082]: spawn /usr/bin/systemd-run -M nsdc -q -t /usr/bin/samba-tool user setpassword test7
May 7 12:35:08 nethserver esmith::event[14082]: New Password:
May 7 12:35:08 nethserver esmith::event[14082]: Retype Password:
May 7 12:35:08 nethserver esmith::event[14082]: Changed password OK
May 7 12:35:08 nethserver esmith::event[14082]: Action: /etc/e-smith/events/password-modify/S30nethserver-dc-password-set SUCCESS [0.233011]
May 7 12:35:08 nethserver esmith::event[14082]: Enabled user 'test7’
May 7 12:35:08 nethserver esmith::event[14082]: Action: /etc/e-smith/events/password-modify/S40nethserver-dc-user-unlock SUCCESS [0.209813]
May 7 12:35:08 nethserver esmith::event[14082]: Action: /etc/e-smith/events/password-modify/S90password-cleanup SUCCESS [0.004225]
May 7 12:35:08 nethserver esmith::event[14082]: Event: password-modify SUCCESS

Is this bug not fixed in current versions?

You have a different problem, take a look at this solution: