Configuring the sudo Permission
During the HPC cluster consistency check, if you run mpirun as a common user and want to collect data that can only be collected by privileged users, configure the sudo permission for the common user.
- Go to the corresponding directory.
1cd /etc/sudoers.d
- Create a sudoers file.
Name the sudoers file as required, for example, mpi_sudoers.
1vim mpi_sudoers - Edit the sudoers file.
Add the following configuration information to the file. mpi2test is the user configured for the current server.
1 2 3 4 5 6
1 mpi2test ALL=(root) NOPASSWD:/usr/sbin/dmidecode -t bios 2 mpi2test ALL=(root) NOPASSWD:/usr/sbin/lshw -class memory -json 3 mpi2test ALL=(root) NOPASSWD:/usr/sbin/dmidecode -t memory 4 mpi2test ALL=(root) NOPASSWD:/usr/sbin/lshw -class network -json 5 mpi2test ALL=(root) NOPASSWD:/usr/sbin/cma_roce_tos 6 mpi2test ALL=(root) NOPASSWD:/usr/sbin/lshw -class bridge -class storage -class disk -json
Press Esc, type :wq!, and press Enter to save the file and exit.
- (Optional) Repeat the preceding steps on servers where you, as a common user, want to collect data that can only be collected by privileged users.
Parent topic: Common Operations