TransWikia.com

Centos8 - After a login systemd touches /boot/grub2

Unix & Linux Asked on December 3, 2021

I’m using Centos8 on a mini-PC as a router/firewall, and run Tripwire. I’m the only one who ever logs in, always as a non-privileged user, not root (ssh root login is disabled).

Every time I login, the /boot/grub2 directory’s "Modify time" and "Change time" attributes get changed, which causes it to be flagged in Tripwire.

I think I’ve traced this to `systemd’, which runs "Mark boot as successful" 2 minutes after a user logs in. The relevant line in the system log is:

Mar 31 15:49:46 janus systemd[5911]: Started Mark boot as successful after the user session has run 2 minutes.

First of all, deciding the boot was successful based on a user logging in seems like an awful kludge… what if it’s a remotely attended system and nobody logs in? (rhetorical question).

My real question is can I just disable this systemd unit, or will that cause other things to not work as expected?

Additional Information

I’ve traced this to the systemctl service /lib/systemd/user/grub-boot-success.service, which contains:

[jhg@janus ~]$ more /lib/systemd/user/grub-boot-success.service
[Unit]
Description=Mark boot as successful

[Service]
Type=oneshot
ExecStart=/usr/sbin/grub2-set-bootflag boot_success

This is being run 2 minutes after every user login instead of once per boot after the first user login, and this is what is touching the file and directory.

Is this working as intended, or should I file a bug report?

Will disabling this hurt anything?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP