HP XC System Software Administration Guide Version 4.0

Table Of Contents
8.3.6 Changing the Default Nagios User Name
Often the Nagios user name and user ID are established during the initial system configuration,
that is, when the cluster_config utility is run. If a Nagios user name is found at that time,
the HP XC system uses that user name and user ID instead of creating the default user name and
user ID. However, you can configure the HP XC system to use an alternate nagios user and
group account.
Use the following procedure to change the default Nagios user name.
1. Stop the Nagios service if the HP XC system is running. For instructions on how to stop the
Nagios service, see “Stopping and Restarting Nagios” (page 115).
2. Verify the Nagios user ID:
# grep nagios /etc/passwd
nagios:x:222:222::/home/nagios:/bin/bash
NOTE: The default Nagios user account ID, nagios, is 222.
3. Use the standard user account utilities to delete the nagios user account, then add another:
# userdel r nagios
# useradd u 222 g hpadm newname
Alternatively, you can use NIS to change the user account name if this appropriate for your
site.
NOTE: This example retains the default user ID for Nagios.
4. Change the line:
nagios_user=nagios
to
nagios_user=newname
in each of the following files:
/opt/hptc/nagios/etc/nagios.cfg
/opt/hptc/nagios/etc/nagios_monitor.cfg
/opt/hptc/nagios/etc/nrpe.cfg
/opt/hptc/nagios/etc/nsca.cfg
NOTE: Complete steps 5 through 10 only for a new user name that was added after the
cluster_config utility was run.
5. To change the ownership of Nagios files to the newname user, perform the following steps:
a. Change to the root directory:
# cd /
b. Use the following command to change the file ownership from user nagios to newname:
# find . mount user nagios | xargs chown newname
IMPORTANT: If the /hptc_cluster file system is a Lustre file system (SFS), run the
following command to change file ownership on that file system separately:
# find /hptc_cluster user nagios | xargs chown newname
6. Ensure that the password files are synchronized throughout the HP XC system:
# pdcp a /etc/passwd /etc/passwd
8.3 Adjusting the Nagios Configuration 119