You are not logged in.
Does anyone know why shadow.service keeps failing after every reboot, which can be fixed by recreating the folder /var/spool/mail again, and again, and again...?
$ systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● shadow.service loaded failed failed Verify integrity of password and group files
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.
[zbigniew@MSI-Arch ~]$ 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 2023-05-12 12:18:56 CEST; 2h 7min ago
Duration: 95ms
TriggeredBy: ● shadow.timer
Main PID: 993 (code=exited, status=1/FAILURE)
CPU: 19ms
maj 12 12:18:56 MSI-Arch systemd[1]: Started Verify integrity of password and group files.
maj 12 12:18:56 MSI-Arch sh[1027]: user 'mail': directory '/var/spool/mail' does not exist
maj 12 12:18:56 MSI-Arch sh[1027]: pwck: bez zmian
maj 12 12:18:56 MSI-Arch systemd[1]: shadow.service: Main process exited, code=exited, status=1/FAILURE
maj 12 12:18:56 MSI-Arch systemd[1]: shadow.service: Failed with result 'exit-code'.
[zbigniew@MSI-Arch ~]$ cd /var/spool/
[zbigniew@MSI-Arch spool]$ sudo mkdir mail
[zbigniew@MSI-Arch spool]$ sudo systemctl restart shadow.service
[zbigniew@MSI-Arch spool]$ sudo systemctl status shadow.service
○ shadow.service - Verify integrity of password and group files
Loaded: loaded (/usr/lib/systemd/system/shadow.service; static)
Active: inactive (dead) since Fri 2023-05-12 14:27:06 CEST; 3s ago
Duration: 55ms
TriggeredBy: ● shadow.timer
Process: 439987 ExecStart=/bin/sh -c /usr/bin/pwck -r || r=1; /usr/bin/grpck -r && exit $r (code=exited, status=0/SUCCESS)
Main PID: 439987 (code=exited, status=0/SUCCESS)
CPU: 52ms
maj 12 14:27:06 MSI-Arch systemd[1]: Started Verify integrity of password and group files.
maj 12 14:27:06 MSI-Arch systemd[1]: shadow.service: Deactivated successfully.
[zbigniew@MSI-Arch spool]$ systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
Last edited by Zibi1981 (2023-05-13 16:24:39)
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
The directory is part of the filesystem package, why does it not exist or get removed on your system?
pacman -Qkk filesystem
do you have a wonky/broken /var btrfs snapshot?
Last edited by V1del (2023-05-12 12:36:11)
Offline
The directory is part of the filesystem package, why does it not exist or get removed on your system?
pacman -Qkk filesystem
do you have a wonky/broken /var btrfs snapshot?
OK, now I seem to get it. Have a look at my /etc/fstab file, which has some SSD tweaks probably related to this issue
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p6 LABEL=Linux
UUID=fcef3735-b24e-d901-e0e0-3735b24ed901 / ext4 rw,relatime 0 1
# /dev/nvme0n1p1 LABEL=SYSTEM
UUID=DE84-77C3 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/nvme0n1p3 LABEL=Windows
UUID=A00AC11E0AC0F278 /windows_c ntfs rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 0
# /dev/nvme0n1p7 LABEL=WinRE\134x20tools
UUID=24F28577F2854DCC /windows_x ntfs rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 0
# /dev/nvme0n1p8 LABEL=BIOS_RVY
UUID=F8C08798C0875BAE /windows_y ntfs rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 0
# /dev/nvme0n1p5
UUID=b23635f0-b55a-4f84-abd5-80158d874197 none swap defaults 0 0
# SSD tweak
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
Maybe there is a way to make shadow.service to work without loosing the benefits of those tweaks?
Last edited by Zibi1981 (2023-05-12 13:47:34)
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline
Create the relevant file system structure so that the service file doesn't get tripped up, you can do so for volatile files/filesystems using systemd's tmpfiles implementation: https://wiki.archlinux.org/title/System … rary_files
Offline
So I've created a file shadowservice.conf in the folder /etc/tmpfiles.d/ with one line
D /var/spool/mail 0755 root root
and that seems to solve my problem.
Thank you.
"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."
MSI Raider GE78HX 13VI-032PL
Offline