This question already has an answer here:
On my centos 7 vps server, to secure my server I disabled root login via ssh. I created a new user called erdem and login with that user via ssh. After I login via ssh with user erdem, I would like to switch to root user with su command or su -s command. When I do that I get this error:
-bash: /usr/bin/su: Permission denied
How can I give permission to user called erdem so I can switch with su or su -s command to root.
The output of
ls -l /usr/bin/su:
-rwsr-x--- 1 root wheel /usr/bin/su
I tried to add the user into wheel group but it still gives the same error.
I used bellow command
gpasswd -a erdem wheel
Solved: I needed to logout and login again.