Setting-up Sudo To Allow A User To Edit A Root Editable File


Quite often, we need to allow users to be able to edit files that only root can edit. Obviously we can’t provide them full root access 😉 This situation takes us to sudoers file. Adding a simple line to the sudoers file can make this happen.

test_user ALL=(ALL) NOPASSWD: /bin/vi /etc/profile

Adding this line will enable test_user to edit /etc/profile file without needing to enter password. It just needs to enter sudo vi /etc/profile 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s