Question

We used to run our application as a special user (say "suser") instead of root user. So we will give some permissions to this suser for running some commands without needing a password by adding this in the /etc/sudoers file.

I believe changing this file will require a reboot or log off. Correct me if I am wrong.

Which one is better changing directly /etc/sudoers file or adding a separate sudoers file in /etc/sudoers.d directory ? Is there any reason to avoid modifying /etc/sudoers file directly ?

During uninstall of my application, is removing the user (suser) alone enough?

Was it helpful?

Solution

Changing /etc/sudoers file does not require a reboot or log off changes are reflected immediately once the file is saved.using the visudo command is the recommended way to update sudoers content, since it protects against many failure modes.

keeping changes in /etc/sudoers.d directory is a convenient way to add and remove permissions(application specific) instead of modifying the /etc/sudors file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top