M BUZZ CRAZE NEWS
// news

How do I allow only one user to su to another account?

By Jessica Wood

I have user-a and user-b on my box.

How do I do a no-password su - user-b as user-a?

1 Answer

su is not meant to do that -- sudo is.

Open /etc/sudoers.d/custom and write the following:

user-a ALL=(user-b:user-b) NOPASSWD:ALL

Which means: whenever user-a executes sudo -u user-b (or any other variant), let him go without asking for password.

1

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