0

I created a user "sysuser" with -r option, when trying to su using another non-root user I am prompted for password.

As "sysuser" is a system account and should not login, I did not set up a password. (With sysuser I need to be able to own files and run tomcat.)

What can I do to su without password prompt? The OS is RHEL 6.

  • Possible duplicate of unix.stackexchange.com/questions/113754/… – Oldskool Mar 23 '15 at 11:28
  • @oldskool, yes they look similar but I have tried the solution..doesnt work. Possibly the user I am trying to setup is system account? – Sri Mar 23 '15 at 23:17
  • 'code' auth [success=ignore default=1] pam_succeed_if.so user = martin-test auth sufficient pam_succeed_if.so use_uid user = martin 'code' Actually tried with 2 normal users too...still being prompted for password when su. – Sri Mar 24 '15 at 0:30
0

With a bit of experimenting I solved my own problem. Requirement was for ANY USER to be able to su to sysuser without password prompt. Added the below line /etc/pam.d/su:

auth sufficient pam_succeed_if.so user = sysuser

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.