0

I need to edit visudo file to allow users to access certain commands. If i edit visudo file to add some commands, then i have to edit visudo file very frequently . Instead of editing visudo file I want to give a file address in that file I want to modify commands based on their requirements.

Mohan
  • 101

1 Answers1

0

You could create an additional configuration file, located in the directory /etc/sudoers.d/. You should use the same syntax as in /etc/sudoers/.

But note! If you commit a typo in these files, you will not be able to use the sudo command anymore, while the typo exists, so you will stuck out of the administrator's privileges.

visudo parses the sudoers file after the edit and will not save the changes if there is a syntax error - read more.

Here is a great answer related to this question:

pa4080
  • 29,831