HP XC System Software Administration Guide Version 3.2

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
7. Create the ssh keys for the newname user account:
# /opt/hptc/bin/ssh_create_shared_keys user newname
8. Capture the Nagios keys and replicate them across the HP XC system:
# tar cvf /hptc_cluster/newname_keys.tar /home/newname
# pdsh a x nh "tar xvf /hptc_cluster/newname_keys.tar"
9. Verify that you can log in to a random node as the newname user:
# ssh any_node -l newname
10. Use the nconfigure utility to reconfigure Nagios across the HP XC system:
# pdsh a "service nagios nconfigure"
8.3 Adjusting the Nagios Configuration 119