su gives permission denied
Solution 1:
su
and sudo
are different tools and work differently.
su
always requires the root password to be entered in order to gain root privileges.
sudo
requires the user's password to be entered (provided they are configured to be eligible for access) by default, but can be configured to require entering root's password as well.
You probably want to install sudo
and use that instead of su
.