Shadow.service: Failed with result 'exit-code'

Hi Everyone,

Hope you’re all doing OK. My system seems fine. I was learning how to manage services, users and groups on EndeavourOS and noticed an error in the shadow.service when I listed the services. Of course that led me to a status on shadow.service and the displaying of the error with gshadow service entries. Below.

sudo 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 Fri 2025-04-18 00:00:46 EDT; 13h ago
   Duration: 39ms
 Invocation: cbcf7edea3194876975eb38be56e1cc5
TriggeredBy: ● shadow.timer
    Process: 14463 ExecStart=/bin/sh -c /usr/bin/pwck -qr || r=1; /usr/bin/grpck -r && exit $r (code=exited, status=2)
   Main PID: 14463 (code=exited, status=2)
   Mem peak: 2.7M
        CPU: 15ms

Apr 18 00:00:46 LinPC sh[14465]: add group 'uucp' in /etc/gshadow? No
Apr 18 00:00:46 LinPC sh[14465]: no matching group file entry in /etc/gshadow
Apr 18 00:00:46 LinPC sh[14465]: add group 'nopasswdlogin' in /etc/gshadow? No
Apr 18 00:00:46 LinPC sh[14465]: no matching group file entry in /etc/gshadow
Apr 18 00:00:46 LinPC sh[14465]: add group 'rfkill' in /etc/gshadow? No
Apr 18 00:00:46 LinPC sh[14465]: no matching group file entry in /etc/gshadow
Apr 18 00:00:46 LinPC sh[14465]: add group 'sys' in /etc/gshadow? No
Apr 18 00:00:46 LinPC sh[14465]: grpck: no changes
Apr 18 00:00:46 LinPC systemd[1]: shadow.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 18 00:00:46 LinPC systemd[1]: shadow.service: Failed with result 'exit-code'.

I have no clue how long this has been there but it does’t seem to affect normal operation of my system.
I would like to clear it up in case it will lead to issues down the road.
The only thing I have change recently, within the past 3 weeks, was to install Syncthing, set it up get it working syncing to 2x networks shares.

That work wonderfully but it was not the “backup” solution type I am looking for. That’s another thread possibly in the near future. I am trying hard to work this out myself.

So, I uninstalled it using pacman -Runs Syncthing
THAT seemed to working fine and once again no clue how long this gshadow error has been present on the PC.

Any help would be wonderful and tyvm.

John

To help you with this is a little out of my range but it seems the issue stems from inconsistencies between the two files /etc/group and /etc/gshadow.

You seem to have some groups in /etc/group whit no corresponding entries in /etc/shadows.

Please look here for a bit more info:

https://wiki.archlinux.org/title/Users_and_groups#Automatic_integrity_checks

I hope someone with knowledge about how to fix this comes and help you.

Hi Cactus,

TY vm for the response.
I know nothing of the shadow service and although I do understand user and group management I am fairly new to Linux.
I know for a fact there is differences between /etc/group and gshadow because I looked at both of them.

cat /etc/group
sudo cat /etc/gshadow

What I DO not know is if it is a big deal or not?
Can I safely ignore this autocheck?
Should I add the groups to gshadow?

Today when I run: sudo systemctl status shadow.service

the UUCP is missing.

sudo systemctl status shadow.service
[sudo] password for yodaminium: 
× 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 2025-04-19 07:41:52 EDT; 13min ago
   Duration: 17ms
 Invocation: 195967c2167d4316b3461bf0adbd80d3
TriggeredBy: ● shadow.timer
    Process: 873 ExecStart=/bin/sh -c /usr/bin/pwck -qr || r=1; /usr/bin/grpck -r && exit $r (code=exited, status=2)
   Main PID: 873 (code=exited, status=2)
   Mem peak: 3.1M
        CPU: 15ms

Apr 19 07:41:53 LinPC sh[882]: no matching group file entry in /etc/gshadow
Apr 19 07:41:53 LinPC sh[882]: add group 'nopasswdlogin' in /etc/gshadow? No
Apr 19 07:41:53 LinPC sh[882]: no matching group file entry in /etc/gshadow
Apr 19 07:41:53 LinPC sh[882]: add group 'rfkill' in /etc/gshadow? No
Apr 19 07:41:53 LinPC sh[882]: no matching group file entry in /etc/gshadow
Apr 19 07:41:53 LinPC sh[882]: add group 'sys' in /etc/gshadow? No
Apr 19 07:41:53 LinPC sh[882]: grpck: no changes
Apr 19 07:41:52 LinPC systemd[1]: Started Verify integrity of password and group files.
Apr 19 07:41:52 LinPC systemd[1]: shadow.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 19 07:41:52 LinPC systemd[1]: shadow.service: Failed with result 'exit-code'.

All I did was shut down my PC-no uninstalls no further troubleshooting on this at all as I wanted to wait until the experts kicked in their thoughts first.
The UUCP groups is still not listed in gshadow either so it was not resolved by adding the group.

Could all of this have been caused by the fact that I turned on my WIFI adapter?
I have a USB WIFI adapter connected to the system but I have had WIFI turned off. I had an ISP issue last week and turned on my WIFI adapter in order to connect to my cells hotpot.

uucp = RS-232 serial ports and devices connected to them.

I do not have any serial ports on this system AFAIK.

Honestly, I have never experienced this issue myself. Being new to me, it awakened my curiosity and therefore I took a little look at it yesterday evening.

Well my hope was and still is that people with knowledge about handling this sort of issue will come and help.

I have taken a little closer look at this. I have both sys and rfkill in both /etc/group and /etc/shadows.

$ getent group sys
sys:x:3:bin

$ getent group rfkill 
rfkill:x:981:

And I do have the corresponding entries for these in /etc/gshadow.

What I am wondering about is the nopasswdlogin group in your /etc/group. I suppose you didn’t add that group yourself and I don’t know if it is added by EOS’ installation.

On a Arch system, I don’t have that. It is a group for enabling passwordless login for its members.

You can check with getent nopasswdlogin

For the other two, I would personally add them to /etc/gpasswd to have consistency between the two files.

From what I gather, it is safer to use the command line toolgrpconv to sync the two files than manually editing them. grpconv should create or update the /etc/gshadow file from the existing /etc/group file. It will add missing entries for groups present in /etc/group but absent in /etc/gshadow.

Please look at: https://man.archlinux.org/man/grpconv.8

And please make sure to know what you are doing. I don’t want to be responsible or simply can not be hold responsible if something breaks in your system.

1 Like

Sorry for taking so long to reply.
Thank you for your response.

I’ve been reading a bunch on the shadow service.
I checked the names of the services involved and none seem to be malicious.

I am not going to start messing around with user/group files manually, that would just be stupid for a person at my knowledge level.

I have received some updates since then but, I still have the initial issue.
It does not seem to have affected anything.
At least anything noticeable.

udo 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 2025-05-01 17:28:34 EDT; 4s ago
   Duration: 35ms
 Invocation: 827e9710a9a441ac97a96c73b8cf3aa6
TriggeredBy: ● shadow.timer
    Process: 11070 ExecStart=/bin/sh -c /usr/bin/pwck -qr || r=1; /usr/bin/grpck -r && exit $r (code=exi>
   Main PID: 11070 (code=exited, status=2)
   Mem peak: 2.8M
        CPU: 12ms

May 01 17:28:34 PC sh[11072]: add group 'uucp' in /etc/gshadow? No
May 01 17:28:34 PC sh[11072]: no matching group file entry in /etc/gshadow
May 01 17:28:34 PC sh[11072]: add group 'nopasswdlogin' in /etc/gshadow? No
May 01 17:28:34 PC sh[11072]: no matching group file entry in /etc/gshadow
May 01 17:28:34 PC sh[11072]: add group 'rfkill' in /etc/gshadow? No
May 01 17:28:34 PC sh[11072]: no matching group file entry in /etc/gshadow
May 01 17:28:34 PC sh[11072]: add group 'sys' in /etc/gshadow? No
May 01 17:28:34 PC sh[11072]: grpck: no changes
May 01 17:28:34 PC systemd[1]: shadow.service: Main process exited, code=exited, status=2/INVALIDARGU>
May 01 17:28:34 PC systemd[1]: shadow.service: Failed with result 'exit-code'.
lines 1-21/21 (END)


Here is some info about UUCP, that might shine some light at this “problem”