4

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

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

7

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.

  • That worked. All I needed to do than was 'sudo -u user-b bash' – Wojtek Jan 13 '14 at 14:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.