05-25-2009
2,157,
51
Join Date: Feb 2007
Last Activity: 6 September 2017, 5:43 AM EDT
Location: Innsbruck, Austria
Posts: 2,157
Thanks Given: 12
Thanked 51 Times in 48 Posts
Anyone can su to another user, unless that user is root. (su with no args or just -). They just need to know the target user's password. Root can always su as any user without the password.
It depends on the system, but historically, anyone in the "wheel" group can run su as root, assuming they know the root password. You can check this in /etc/group and grep for the "wheel" entry. On Linux systems, especially modern ones, you cannot count on this. First, /etc/security/access is consulted, /etc/pam.d/ is consulted, and depending on this, wheel might or might not be used to allow users. If it's not, chances are anyone can su.
As for the second part, anyone who can successfully su to root can do anything they like.