2

My su does not ask for password. When I run su it simply logs me in to root. I tried su - root then it asks for password. Now, because of this kdesu runs applications with root rights without password. I tried replacing su with the following script

#!/bin/bash
/root/./su - root 
exit

I moved my su into /root.

Now kdesu asks for a password but hangs as soon as I hit Enter after typing the password.

I'm using Arch Linux.

  • Have you edited /etc/pam.d/su or any of the other authentication configs? – jasonwryan Jul 5 '14 at 3:06
  • 1
    @jasonwryan - thanks man i completely forgot about /etc/pam.d/su found the problem and fixed it! – compiler Jul 5 '14 at 4:20
4

As man su notes, /etc/pam.d/su is the default PAM configuration file for su. One of the options is to grant implicit elevated privileges for anyone in the wheel group:

# Uncomment the following line to implicitly trust users in the "wheel" group.
auth        sufficient  pam_wheel.so trust use_uid

With this line uncommented, when you issue su without any arguments, su defaults to running an interactive shell as root and, if your user is in the wheel group, without a password prompt.

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.