30.4. Adding sudo Commands, Command Groups, and Rules
30.4.1. Adding sudo Commands Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Adding sudo Commands in the Web UI
- Under the Policy tab, click
. - Click at the top of the list.
- Fill out the information about the command. Enter the full system path to the command executable.
Figure 30.1. Adding a New
sudoCommand - Click . Alternatively, click to start adding another entry or to start editing the new entry.
Adding sudo Commands from the Command Line
To add a
sudo command, use the ipa sudocmd-add command. Provide the full system path to the command executable. For example, to add the /usr/bin/less command and a description:
30.4.2. Adding sudo Command Groups Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Adding sudo Command Groups in the Web UI
- Under the Policy tab, click
. - Click at the top of the list.
- Fill out the information about the command group.
Figure 30.2. Adding a New
sudoCommand Group - Click to start editing the command group.
- Under the Sudo Commands tab, click to add a
sudocommand to the group. Select the required commands and move them to the Prospective column using the button.Figure 30.3. Adding Commands to a
sudoCommand Group - Click .
Adding sudo Command Groups from the Command Line
- Create the command group using the ipa sudocmdgroup-add command. For example, to create the
filescommand group and add its description:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Include a
sudocommand in the group using the ipa sudocmdgroup-add-member command. Note that you can only include commands that have already been added to IdM, as described in Section 30.4.1, “AddingsudoCommands”.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
30.4.3. Adding sudo Rules Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Adding sudo Rules in the Web UI
- Under the Policy tab, click
. - Click at the top of the list.
- Enter the name for the rule.
Figure 30.4. Naming a New
sudoRule - Click . Alternatively, click to start adding another entry or to start editing the new entry.
For information on how to edit the new
sudo rule, see Section 30.6, “Modifying sudo Rules”.
Adding sudo Rules from the Command Line
To add a new
sudo rule, use the ipa sudorule-add command. For example, to add a rule named files-commands:
For more information on using ipa sudorule-add and the options it accepts, run the command with the
--help option added.
For information on how to edit the new
sudo rule, see Section 30.6, “Modifying sudo Rules”.
For a complete example of adding a new
sudo rule and editing it from the command line, see Example 30.1, “Adding and Modifying a New sudo Rule from the Command Line”.