#/bin/sh bad_users_groups=("cockpit-wsinstance-socket" "cockpit-session-socket") failed=false for gu in "${bad_users_groups[@]}"; do echo $gu if getent passwd "$gu" > /dev/null; then echo "user ${gu} exists, cockpit will fail to start up if this user exists, please run userdel ${gu} to resolve this" failed=true fi if getent group "$gu" > /dev/null; then echo "group ${gu} exists, cockpit will fail to start up if this group exists, please run groupdel ${gu} to resolve this" failed=true fi done if getent passwd cockpit-systemd-service > /dev/null; then echo "user cockpit-systemd-service exists, cockpit will fail to start up if this group exists, please run userdel cockpit-systemd-service to resolve this" failed=true fi if [ -f /etc/nsswitch.conf ]; then grep -Fxq "passwd: compat systemd" /etc/nsswitch.conf; then if [ $? -ne 0 ]; then echo "/etc/nsswitch.conf is out of date, please update it from /usr/etc/nsswitch.conf to use cockpit" failed=true fi fi if $failed; then exit 1 fi