ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
493 stars 579 forks source link

redis: Not a user managed by systemd-homed: No home for user redis known #1821

Open sergey-safarov opened 1 year ago

sergey-safarov commented 1 year ago

I use Fedora 37 core dist. When I configured Redis resource then I can see failed systemd resource for use for redis user home directory initialization.

[root@wc-0 ~]# systemctl status user@974.service
× user@974.service - User Manager for UID 974
     Loaded: loaded (/usr/lib/systemd/system/user@.service; static)
     Active: failed (Result: exit-code) since Sun 2022-11-20 03:31:42 UTC; 11min ago
       Docs: man:user@.service(5)
    Process: 1430433 ExecStart=/usr/lib/systemd/systemd --user (code=exited, status=224/PAM)
   Main PID: 1430433 (code=exited, status=224/PAM)
        CPU: 247ms

Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1]: Starting user@974.service - User Manager for UID 974...
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1430433]: pam_systemd_home(systemd-user:account): Not a user managed by systemd-homed: No home for user redis known
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1430433]: PAM failed: Authentication service cannot retrieve authentication info
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1430433]: user@974.service: Failed to set up PAM session: Operation not permitted
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1430433]: user@974.service: Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1]: user@974.service: Main process exited, code=exited, status=224/PAM
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1]: user@974.service: Failed with result 'exit-code'.
Nov 20 03:31:42 wc-0.sbc.la.nga911.com systemd[1]: Failed to start user@974.service - User Manager for UID 974.

And user info

[root@wc-0 ~]# getent passwd redis
redis:x:974:974:Redis Database Server:/var/lib/redis:/sbin/nologin
oalbrigt commented 1 year ago

Does /var/lib/redis exist, and is it owned by the redis user?

sergey-safarov commented 1 year ago

yes it is

[root@bcf-0 ~]# ls -dl  /var/lib/redis
drwxr-x---. 2 redis redis 22 Oct 27 14:27 /var/lib/redis
[root@bcf-0 ~]# ls -l  /var/lib/redis
total 4
-rw-r--r--. 1 redis redis 521 Oct 27 14:27 dump.rdb
oalbrigt commented 1 year ago

Is the user present in /etc/shadow?