You are not logged in.

#1 2014-04-17 08:13:51

D.
Member
Registered: 2012-05-15
Posts: 64

[SOLVED] shadow.service fails

I haven't been tweaking my system much lately, both because it is set up the way I like it and because I haven't been actively interested in it lately. Today I noticed at boot that shadow.service failed. I have updated systemd yesterday and I'm pretty sure this issue popped up only now. It does not seem to cause problems with logging in.

Further inquiry gives me:

systemctl status shadow.service

● shadow.service - Verify integrity of password and group files
   Loaded: loaded (/usr/lib/systemd/system/shadow.service; static)
   Active: failed (Result: exit-code) since Thu 2014-04-17 09:50:07 CEST; 6min ago
  Process: 5847 ExecStart=/usr/bin/pwck -r (code=exited, status=2)
 Main PID: 5847 (code=exited, status=2)

Apr 17 09:50:07 hostname pwck[5847]: duplicate password entry
Apr 17 09:50:07 hostname pwck[5847]: delete line 'uuidd:x:68:68:uuidd:/:/sbin/nologin'? No
Apr 17 09:50:07 hostname pwck[5847]: user 'uuidd': no group 68
Apr 17 09:50:07 hostname pwck[5847]: duplicate password entry
Apr 17 09:50:07 hostname pwck[5847]: delete line 'uuidd:x:998:998::/:/sbin/nologin'? No
Apr 17 09:50:07 hostname pwck[5847]: pwck: no changes
Apr 17 09:50:07 hostname systemd[1]: shadow.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 17 09:50:07 hostname systemd[1]: Failed to start Verify integrity of password and group files.
Apr 17 09:50:07 hostname systemd[1]: Unit shadow.service entered failed state.

journalctl -xn

Apr 17 09:23:57 hostname systemd[1]: shadow.service: main process exited, code=exited, status=2/INVALIDARGUMENT
-- Subject: Unit shadow.service has failed
-- Unit shadow.service has failed.
Apr 17 09:23:57 hostname systemd[1]: Unit shadow.service entered failed state.
Apr 17 09:27:28 hostname dbus[352]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.15" (uid=1000 pid=5525 comm="systemctl start shadow.service ") interface="org.freedesktop.systemd1.Manager" member="StartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/sbin/init ")
Apr 17 09:27:31 hostname sudo[5527]: username : TTY=pts/0 ; PWD=/home/username ; USER=root ; COMMAND=/usr/bin/systemctl start shadow.service
-- Subject: Unit shadow.service has begun with start-up
-- Unit shadow.service has begun starting up.
Apr 17 09:27:31 hostname systemd[1]: shadow.service: main process exited, code=exited, status=2/INVALIDARGUMENT
-- Subject: Unit shadow.service has failed
-- Unit shadow.service has failed.
Apr 17 09:27:31 hostname systemd[1]: Unit shadow.service entered failed state.

I'm not sure what I'm doing in this field and can't seem to find topics with similar problems to this.

Last edited by D. (2014-04-17 13:04:01)

Offline

#2 2014-04-17 08:50:48

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] shadow.service fails

https://bbs.archlinux.org/viewtopic.php … 2#p1171272

In your case, it seems you have two uuid entries in passwd, and you just have to remove the 68 one. In general, you can just update the uuid line in shadow, gshadow, passwd and group with the one currently shipped with the filesystem package (or from the corresponding .pacnew files, if you stil have them).

Last edited by hokasch (2014-04-17 09:10:23)

Offline

#3 2014-04-17 13:03:47

D.
Member
Registered: 2012-05-15
Posts: 64

Re: [SOLVED] shadow.service fails

I noticed that message, but thought I'd ask before trying to delete it without knowing what I was doing. That fixed it, thanks.

Offline

#4 2014-04-18 20:05:42

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [SOLVED] shadow.service fails

I've got a similar problem with shadow.service not starting due to invalid password file integrity:

shadow.service - Verify integrity of password and group files
   Loaded: loaded (/usr/lib/systemd/system/shadow.service; static)
   Active: failed (Result: exit-code) since Sat 2014-04-19 07:40:53 NZST; 22min ago
  Process: 289 ExecStart=/usr/bin/pwck -r (code=exited, status=2)
 Main PID: 289 (code=exited, status=2)

Apr 19 07:40:53 taniwha-folio13 pwck[289]: user 'rtkit': no group 133
Apr 19 07:40:53 taniwha-folio13 pwck[289]: user 'git': no group 998
Apr 19 07:40:53 taniwha-folio13 pwck[289]: user 'transmission': no group 169
Apr 19 07:40:53 taniwha-folio13 pwck[289]: user 'ntp': no group 87
Apr 19 07:40:53 taniwha-folio13 pwck[289]: user 'uuidd': no group 997
Apr 19 07:40:53 taniwha-folio13 pwck[289]: user 'rpc': no group 32
Apr 19 07:40:53 taniwha-folio13 pwck[289]: pwck: no changes
Apr 19 07:40:53 taniwha-folio13 systemd[1]: shadow.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 19 07:40:54 taniwha-folio13 systemd[1]: Failed to start Verify integrity of password and group files.
Apr 19 07:40:54 taniwha-folio13 systemd[1]: Unit shadow.service entered failed state.

In my case, the error message indicates users without groups. How do I address this?

ps similar problem, so not sure if I should start a new thread or not smile


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#5 2014-04-19 10:55:21

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] shadow.service fails

Check your /etc/group file, it should have corresponding records for each default GID specified in /etc/passwd (e.g. "git:x:996:"). Did you overwrite your group file with group.pacnew?

Manually fix the uuid one as above, for the rest just reinstalling the corresponding package should recreate the user/groups (not sure where rpc comes from though).

Last edited by hokasch (2014-04-19 10:55:33)

Offline

#6 2014-04-20 05:05:02

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [SOLVED] shadow.service fails

Solved now for me too, using hokash's advice. I just edited the /etc/group file so the entries that shadow.service was complaining were absent were present.

Thanks! smile


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#7 2014-04-26 06:35:46

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [SOLVED] shadow.service fails

Huh - the problem just reoccurred tonight, with shadow.service failing, complaining about "user 'avahi' : no group 84" etc,  despite the correct entries appearing in /etc/groups.


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#8 2014-04-26 10:17:18

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] shadow.service fails

The output of this service is simply that of the grpck and pwck commands. Run those manually; and have a look at the man-pages of those commands for further tips on how to fix this.

Offline

#9 2014-04-28 04:07:38

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [SOLVED] shadow.service fails

Thanks - I still don't understand how /etc/group and /etc/gshadow work together (got some reading to do). However, a judicious combination of editing /etc/group and following the prompts of the 'grpck' command seems to have solved it.


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#10 2014-04-28 07:35:39

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] shadow.service fails

Yes; well, there's your problem. You shouldn't edit these files manually; next time you should use groupmod (or usermod) and both files will be updated for you, which will also prevent pwck and grpck from complaining

Last edited by Spider.007 (2014-05-03 14:21:59)

Offline

#11 2014-04-28 15:21:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED] shadow.service fails

Spider.007 wrote:

Yes; well, that's you're problem. You shouldn't edit these files manually; next time you should use groupmod (or usermod) and both files will be updated for you, which will also prevent pwck and grpck from complaining

Just a heads up, there are other ways to confuse things.  I was having trouble with this service failing and traced it to having once installed aurbuild (for the AUR) on my system.  I have vague recollections of having done so as an experiment/evaluation.  I also uninstalled it, but it left behind an aurbuild user.  That user had a home directory in /tmp.  When that directory went away, this service broke -- without ever having edited by hand.  Removal of that user was all it took to restore order.

Last edited by ewaller (2014-04-28 15:22:29)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2014-06-14 23:49:09

ganlu
Member
From: ChongQing, China
Registered: 2004-01-04
Posts: 360

Re: [SOLVED] shadow.service fails

run "grpck" and "pwck", say 'yes" to add some correct entries, which works for me.

Last edited by ganlu (2014-06-15 00:02:56)

Offline

#13 2014-06-17 21:01:53

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: [SOLVED] shadow.service fails

ganlu wrote:

run "grpck" and "pwck", say 'yes" to add some correct entries, which works for me.

Thanks, this solution worked the best for me.

Offline

#14 2014-08-04 08:52:30

Vladimiroff
Member
From: Sofia, Bulgaria
Registered: 2009-02-15
Posts: 21

Re: [SOLVED] shadow.service fails

I have similar, but NOT quite the same issue with shadow:

Aug 04 11:06:02 phi systemd[1]: Starting Verify integrity of password and group files...
Aug 04 11:06:02 phi pwck[258]: user 'lldpd': directory '/run/lldpd' does not exist
Aug 04 11:06:02 phi pwck[258]: pwck: no changes
Aug 04 11:06:02 phi systemd[1]: shadow.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 04 11:06:02 phi systemd[1]: Failed to start Verify integrity of password and group files.
Aug 04 11:06:02 phi systemd[1]: Unit shadow.service entered failed state.

This leads to hanging lock screen in KDE, though.

Last edited by Vladimiroff (2014-08-04 08:52:42)

Offline

#15 2015-07-23 06:56:10

Forum_Liker
Member
Registered: 2015-07-23
Posts: 53

Re: [SOLVED] shadow.service fails

Hi. Please help with me problem.

● shadow.service - Verify integrity of password and group files
   Loaded: loaded (/usr/lib/systemd/system/shadow.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Чт 2015-07-23 09:07:50 EEST; 36min ago
  Process: 326 ExecStart=/usr/bin/pwck -r (code=exited, status=2)
 Main PID: 326 (code=exited, status=2)

jul 23 09:07:49 Arch-PC systemd[1]: Starting Verify integrity of password and group files...
jul 23 09:07:50 Arch-PC pwck[326]: user «mysql: каталог «/var/lib/mysql» does not exist
jul 23 09:07:50 Arch-PC pwck[326]: pwck: changes are not made
jul 23 09:07:50 Arch-PC systemd[1]: shadow.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
jul 23 09:07:50 Arch-PC systemd[1]: Failed to start Verify integrity of password and group files.
jul 23 09:07:50 Arch-PC systemd[1]: shadow.service: Unit entered failed state.
jul 23 09:07:50 Arch-PC systemd[1]: shadow.service: Failed with result 'exit-code'.

Offline

#16 2015-07-23 06:58:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] shadow.service fails

Have you done anything to help yourself? The answer is two posts above yours...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#17 2015-07-23 08:36:50

Forum_Liker
Member
Registered: 2015-07-23
Posts: 53

Re: [SOLVED] shadow.service fails

jasonwryan wrote:

Have you done anything to help yourself? The answer is two posts above yours...

nothing helped

Offline

#18 2015-07-23 16:10:37

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] shadow.service fails

Forum_Liker wrote:
jasonwryan wrote:

Have you done anything to help yourself? The answer is two posts above yours...

nothing helped

Impossible, you're just being lazy. The problem is described in the error you post "user «mysql: каталог «/var/lib/mysql» does not exist". So, create that directory or delete the user. If you cannot fix that yourself, archlinux might not be the best distro for you

Offline

#19 2015-07-23 16:43:50

Forum_Liker
Member
Registered: 2015-07-23
Posts: 53

Re: [SOLVED] shadow.service fails

everything worked out)))

Offline

Board footer

Powered by FluxBB