Error when I create a new user

activedirectory
v7

(Jose Manuel Insausti) #1

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.


(And) #2

hi
maybe its related


(Giacomo Sanchietti) #3

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

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


(Jose Manuel Insausti) #4

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


(Giacomo Sanchietti) #5

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.


Create User Task completed with errors
Sogo uses the ad.domain.com as default domain
(Jose Manuel Insausti) #6

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

I restart the machine and the same.


(Jose Manuel Insausti) #7

I have deleted the users created since the problem occurred.

Now it seems all right to create and modify.


(Gabor) #8

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


(Gabor) #9

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


(Marcin) #10

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


(Davide Principi) #11

Fix merged upstream, but still no package released

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


(Marcin) #12

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


(Davide Principi) #13

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

(Marcin) #14

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?


(Paul Fisher) #15

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

Thanks


(Andrea) #16

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


(Alberto Sebal) #17

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


(Andrea) #18

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

Best regards


(Alberto Sebal) #19

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?


(Giacomo Sanchietti) #20

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