13 lines
307 B
Bash
Executable File
13 lines
307 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if ! /usr/bin/getent passwd nagios; then
|
|
/usr/sbin/useradd -m -d /var/empty -s /bin/false -c "Nagios user" -U nagios
|
|
/usr/bin/passwd -l nagios
|
|
fi
|
|
|
|
if ! /usr/bin/getent group nagcmd; then
|
|
/usr/sbin/groupadd nagcmd
|
|
/usr/sbin/usermod -a -G nagcmd nagios
|
|
/usr/sbin/usermod -a -G nagcmd www
|
|
fi
|