You are not logged in.

#1 2015-03-28 14:41:11

toketin
Member
From: Belluno (Italy)
Registered: 2007-04-17
Posts: 326

[Solved] Mismatch on GID and shadow.service fails

Hi, randomly the shadow.service fails on loading and it gives me this output:

$ systemctl status shadow.service
● 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 sab 2015-03-28 14:54:50 CET; 13min ago
  Process: 1988 ExecStart=/usr/bin/pwck -r (code=exited, status=2)
 Main PID: 1988 (code=exited, status=2)

mar 28 14:54:50 vivopicenin pwck[1988]: user 'git': no group 999
mar 28 14:54:50 vivopicenin pwck[1988]: user 'systemd-journal-remote': no group 998
mar 28 14:54:50 vivopicenin pwck[1988]: user 'systemd-journal-upload': no group 997
mar 28 14:54:50 vivopicenin pwck[1988]: user 'sddm': no group 996
mar 28 14:54:50 vivopicenin pwck[1988]: user 'rtkit': no group 133
mar 28 14:54:50 vivopicenin pwck[1988]: pwck: nessuna modifica
mar 28 14:54:50 vivopicenin systemd[1]: shadow.service: main process exited, code=exited, status=2/INVALIDARGUMENT
mar 28 14:54:50 vivopicenin systemd[1]: Failed to start Verify integrity of password and group files.
mar 28 14:54:50 vivopicenin systemd[1]: Unit shadow.service entered failed state.
mar 28 14:54:50 vivopicenin systemd[1]: shadow.service failed.

The output instead of pwck is:

$ sudo pwck                            
user 'polkitd': no group 102
user 'avahi': no group 84
user 'colord': no group 124
user 'git': no group 999
user 'systemd-journal-remote': no group 998
user 'systemd-journal-upload': no group 997
user 'sddm': no group 996
user 'rtkit': no group 133
pwck: nessuna modifica

So for example for sddm group it requires a 996 GID, but on my /etc/group file i have this content:

$ cat /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin
adm:x:4:root,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon
mem:x:8:
kmem:x:9:
wheel:x:10:root,marco
ftp:x:11:
mail:x:12:
uucp:x:14:
log:x:19:root
utmp:x:20:
locate:x:21:
rfkill:x:24:
smmsp:x:25:
proc:x:26:
http:x:33:
games:x:50:
lock:x:54:
uuidd:x:68:
dbus:x:81:
network:x:90:
video:x:91:
audio:x:92:
optical:x:93:
floppy:x:94:
storage:x:95:
scanner:x:96:
input:x:97:
power:x:98:
nobody:x:99:
users:x:100:
systemd-journal:x:190:
systemd-journal-gateway:x:191:
systemd-timesync:x:192:
systemd-network:x:193:
systemd-bus-proxy:x:194:
systemd-resolve:x:195:
systemd-journal-upload:x:994:
systemd-journal-remote:x:995:
ntp:x:87:
mysql:x:89:
git:x:993:
usbmux:x:140:
vboxusers:x:108:
sddm:x:992:

There are some mismatches, for example on sddm group which requires 996 GID but on my system i have GID 992.
What should i do in oder to fix it?
Thanks!

P.s. sudo gpwck gives me no output and i don't have any .pacnew on my system.

Last edited by toketin (2015-03-29 17:18:03)

Offline

#2 2015-03-28 22:13:48

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Mismatch on GID and shadow.service fails

You can modify a group GID with the command:

# groupmod --gid 999 git

for the 'git' group; and the same for the other mismatches in group GID.

Or maybe just re-installing the packages which use the 'user:group' with mismatched group GID will be enough to correct the mismatches.

Offline

#3 2015-03-29 12:36:36

toketin
Member
From: Belluno (Italy)
Registered: 2007-04-17
Posts: 326

Re: [Solved] Mismatch on GID and shadow.service fails

Hi thanks for the reply, i've fixed fot the half of the groups' errors, for the others it gives me that the group X doesn't exist. This the output:

# groupmod --gid 102 polkitd               
groupmod: group 'polkitd' does not exist

# groupmod --gid 84 avahi   
groupmod: group 'avahi' does not exist

# groupmod --gid 124 colord
groupmod: group 'colord' does not exist

# groupmod --gid 133 rtkit 
groupmod: group 'rtkit' does not exist

I had tried to re-install yesterday for example git and sddm packages but it didn't fix the issue.

Last edited by toketin (2015-03-29 12:38:01)

Offline

#4 2015-03-29 13:31:08

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [Solved] Mismatch on GID and shadow.service fails

The filesystem package upgrade strikes another victim!  Reinstall "filesystem" and see if that gives you the shadow and group .pacnew files to properly merge?  Or at least a reference to clean ones you can compare your existing files with.

Offline

#5 2015-03-29 15:02:59

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Mismatch on GID and shadow.service fails

toketin wrote:

for the others it gives me that the group X doesn't exist.

It's normal as the command is used only to modify an existing group.
If a group doesn't appear in the /etc/group file, then it was not created and cannot be modified.

You can create the missing groups with:

# groupadd --gid 102 polkitd
etc.

Then run:

# grpck

If just re-installing the packages doesn't repair the mismatches, then the harder way would be:

pacman -R package
pacman -S package

But if you do the repair yourself you will not need this.

Offline

#6 2015-03-29 17:17:45

toketin
Member
From: Belluno (Italy)
Registered: 2007-04-17
Posts: 326

Re: [Solved] Mismatch on GID and shadow.service fails

@headkase i reinstalled 'filesystem' package but it didn't change, i've fixed adding the group with 'groupadd --gid'. Thanks!

Offline

Board footer

Powered by FluxBB