FS#58873 - [systemd] systemd-sysusers failing to create system users with no helpful log
Attached to Project:
Arch Linux
Opened by Mathieu (AgentMat) - Tuesday, 05 June 2018, 06:43 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 01 October 2018, 14:57 GMT
Opened by Mathieu (AgentMat) - Tuesday, 05 June 2018, 06:43 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 01 October 2018, 14:57 GMT
|
Details
Description:
systemd-sysusers is failing at startup and when launched manually, and provided log does not help to find the issue. $ journalctl -u systemd-sysusers -- Logs begin at Sat 2015-02-14 11:06:16 CET, end at Tue 2018-06-05 08:38:14 CEST. -- Apr 04 09:39:46 Gnosis systemd-sysusers[235]: Failed to write files: Invalid argument Apr 04 09:39:46 Gnosis systemd[1]: systemd-sysusers.service: Main process exited, code=exited, status=1/FAILURE Apr 04 09:39:46 Gnosis systemd[1]: systemd-sysusers.service: Failed with result 'exit-code'. Apr 04 09:39:46 Gnosis systemd[1]: Failed to start Create System Users. -- Reboot -- Apr 18 09:05:11 Gnosis systemd[1]: systemd-sysusers.service: Main process exited, code=exited, status=1/FAILURE Apr 18 09:05:11 Gnosis systemd[1]: systemd-sysusers.service: Failed with result 'exit-code'. Apr 18 09:05:11 Gnosis systemd[1]: Failed to start Create System Users. -- Reboot -- May 12 10:30:50 Gnosis systemd-sysusers[227]: Failed to write files: Invalid argument $ systemctl list-units --state=failed UNIT LOAD ACTIVE SUB DESCRIPTION ● systemd-sysusers.service loaded failed failed Create System Users LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. Launching the update manually produces the same error: $ sudo systemd-sysusers Creating group render with gid 992. Creating group cups with gid 209. Creating user cups (cups helper user) with uid 209 and gid 209. Failed to write files: Invalid argument file permission looks fine $ ls -l /etc/passwd /etc/group -rw-r--r-- 1 root root 985 Mar 17 08:48 /etc/group -rw-r--r-- 1 root root 1637 Mar 17 08:48 /etc/passwd After manually adding the groups and user, systemd-sysusers has nothing left to do but still reports a failure : $ sudo systemd-sysusers Failed to write files: Invalid argument Additional info: * package version(s) systemd 238.133-1 * config and/or log files etc. Steps to reproduce: I suppose the issue is specific to my installation. The failure is reported every reboot; starting systemd-sysusers manually also always shows the error. |
This task depends upon
Closed by Doug Newgard (Scimmia)
Monday, 01 October 2018, 14:57 GMT
Reason for closing: Not a bug
Additional comments about closing: Config issues
Monday, 01 October 2018, 14:57 GMT
Reason for closing: Not a bug
Additional comments about closing: Config issues
I have the same problem.
[code]systemctl list-units --state=failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● systemd-sysusers.service loaded failed failed Create System Users[/code]
[code]sudo systemd-sysusers
Creating group adbusers with gid 969.
Creating group render with gid 968.
Failed to write files: Invalid argument[/code]
[code]ls -l /etc/passwd /etc/group
-rw-r--r-- 1 root root 932 Jul 5 10:17 /etc/group
-rw-r--r-- 1 root root 1599 Jul 5 10:17 /etc/passwd[/code]
[quote=Mathieu]After manually adding the groups and user, systemd-sysusers has nothing left to do but still reports a failure :
$ sudo systemd-sysusers
Failed to write files: Invalid argument
Steps to reproduce:
I suppose the issue is specific to my installation. The failure is reported every reboot; starting systemd-sysusers manually also always shows the error.[/quote]
Same here.
Creating temporary files...error: command failed to execute correctly
as well.
Is it possible that the "Creating tempor ... " problem interrupt systemd-sysusers?
I discover the problem installing sddm, the installer was not able to create the system user.
When I was installing sddm I had the following output:
https://pastebin.com/zdGQwBPg
Finally I realized that the PKGBUILD was running the following command successfully:
install -Dm644 "$srcdir"/sddm.sysusers "$pkgdir"/usr/lib/sysusers.d/sddm.conf
The error comes when it tries to run:
systemd-sysusers
Creating group vboxsf with gid 109.
Creating group vboxusers with gid 108.
Creating group gitlab-runner with gid 107.
Creating user gitlab-runner (GitLab Runner) with uid 107 and gid 107.
Creating group sddm with gid 973.
Creating user sddm (Simple Desktop Display Manager) with uid 973 and gid 973.
Failed to write files: Invalid argument
Output:
Creating group realtime with gid 994.
Failed to write files: Invalid argument
Then check that every entry in /etc/group is properly formatted
Many thanks !
I just wonder why grpck doesn't catches this... Maybe this should be improved in the grpck tool, wonder where can this issue be reported? Also the systemd-sysusers binary should be more explicit about what is causing it to fail...
grpck from shadow upstream seems similar to https://github.com/shadow-maint/shadow/issues/94