Su: Permission denied despite correct password

permissionssu

In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried reinstalling the package containng /bin/su.

EDIT: sudo works.

Best Answer

You have to add your user to the wheel group:

 gpasswd -a youruser wheel

Alternatively, you can disable the group membership check for su in pam by editing

 /etc/pam.d/su

and commenting out this line:

auth       required     pam_wheel.so use_uid

It requires users to be in the wheel group to be able to switch user. User switching as non-root works again when this pam module is disabled for su.

Related Question