Configuring privilege escalation with sudo

Sudo allows users to run applications and scripts with the security privileges of another user.

Getting ready

Before allowing someone to elevate their security context for a specific application or script, you need to figure out which user or group you wish to elevate from and to, which applications/scripts you use, and on which systems to run them.

The default syntax for a sudo entry is the following:

who where = (as_whom) what

How to do it…

These simple five steps will guide you through setting up privilege escalation:

  1. Create a new sudoers definition file in /etc/sudoers.d/ called clustering through the following command:
    ~]# visudo -f /etc/sudoers.d/clustering
    
  2. Create a command alias for the most-used clustering ...

Get Red Hat Enterprise Linux Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.