1

I'm trying to implement the following functionality on Redhat:
I have a user "John" that can't be used to login directly via GDM or console or SSH.
I want to allow any user that are logged onto the system, to be able to log as "John" .
How would you do that using PAM modules or any other manner ?

0

You can set the login shell of user John to /sbin/nologin and then login with su -s /bin/bash John.

  • might be even better if people could use sudo which would allow to not share John password – Kiwy Mar 21 '18 at 10:52
  • John's password could also be removed with passwd -d John because this should (as far as I remember) prevent any remote access to the account. – Patrick Mar 21 '18 at 11:15

Your Answer

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

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