How to configure Spectrum SRAdmin for a sudo install using /etc/sudoers.d
search cancel

How to configure Spectrum SRAdmin for a sudo install using /etc/sudoers.d

book

Article ID: 10094

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

The Spectrum installation documentation discusses configuring SRAdmin for sudo using the /etc/sudoers file but not using /etc/sudoers.d

This document discusses how to configure SRAdmin for a sudo install using /etc/sudoers.d

Environment

DX NetOps Spectrum sudo install on Linux

Resolution

After installing SRAdmin as normal, use the following to configure for sudo. This will need to be done on all systems where you are planning to install Spectrum on:

1. Log into the system as the root user or su to the root user

2. cd to the /etc/sudoers.d directory

# cd /etc/sudoes.d/

3. Create a new file that will contain the sudo permissions for the installation of Spectrum as a sudo user. The following is an example of a file we will call sradmin_conf:

spectrum Spectrum01=/sw/SPECTRUM/SRAdmin/sradmin.exe

4. From the above:

spectrum - Is the OS user name that will be given the sudo privileges for sradmin

Spectrum01 - Is the hostname of the system where the distributed install will be run from

/sw/SPECTRUM/SRAdmin/sradmin.exe - Is the full patch to the sradmin.exe executable

5. cd to the directory where the sradmin.exe executable is located. In this example, it is in the /sw/SPECTRUM/SRAdmin directory

6. Create a symbolic link named sudoers to the file created in the /etc/sudoers.d directory. Using the example above, the file created in the /etc/sudoers.d directory is named "sradmin_conf". The link command would look like the following:

# cd /sw/SPECTRUM/SRAdmin/

# ln -s /etc/sudoers.d/sradmin_conf sudoers

7. Stop sradmin by running "/etc/init.d/sradmin stop"

8. Start sradmin by running "/etc/init.d/sradmin start"

9. To verify if the user has been given sudo privileges for sradmin, run "sudo -l" as the user given the sudo privileges. For example, when running "sudo -l" as the "spectrum" user noted above in step 3, the output would look like the following:

[spectrum@Spectrum01 sdic]$ sudo -l

[sudo] password for spectrum:

Matching Defaults entries for spectrum on this host:

    requiretty, !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR

    USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER

    LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User spectrum may run the following commands on this host:

    (root) /sw/SPECTRUM/SRAdmin/sradmin.exe