Comment 8 for bug 1866382

Revision history for this message
Hua Zhang (zhhuabj) wrote :

'sudo -u nagios -- echo $HOME' will always return /home/ubuntu, so we can replace it with the following command to double confirm if the user nagios is created by nagios-nrpe-server.preinst's 'adduser --system --group --home /var/lib/nagios --quiet nagios'

cat /etc/passwd | awk -F: '{printf "User %s Home %s\n", $1, $6}' |grep nagios