I've done the following configuration in ubuntu 14.04 but it's still asking password.
$ /etc/passwd
test:x:1004:1004::/home/test:/bin/bash
$/etc/pam.d/su
auth required pam_wheel.so group=test
auth sufficient pam_wheel.so trust use_uid
Is there any other method to do this?
Best Answer
su to root without a password
In the file
/etc/pam.d/su
put this as the line:To restrict this just to your username, use this line instead, replace the
yourusername
with your actual username:You can also restrict this to a group, here the group allowedpeople can su without a password:
then login