user sudo permissions but not switch to root user

Please help, if I grant permissions to a user in the /etc/sudoers.d file like so:

newuser ALL=(ALL:ALL) ALL 

That user has all permissions. But I don´t want this user to be able to switch to the root user. Is this possible?

Or can anyone tell me how can I set up this user to be able to perform the most common admin tasks but not all of them like he is root.

1

1 Answer

Read man sudoers. Once you manage to decode the Extended Backus-Naur Form (see Extended Backus-Naur form article on wikipedia), you'll see that ALL=(ALL:ALL) ALL is the least restrictive way of using sudo.

You can restrict newuser in many ways.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like