Unable to switch to root using sudo su – effective uid is not 0, is sudo installed setuid root
Error – While switching to root using sudo su - , throwing the below Error.[root@test ~]# ssh testserver.local.com -l nsk
nsk@testserver.local.com's password:
Last login: Tue Dec 12 09:24:48 2017 from 10.0.0.16
-bash-3.2$ sudo su -
sudo: effective uid is not 0, is sudo installed setuid root?
Reason:
/usr/bin/sudo executable don’t have the setuid permission
Solution:
Set the setuid permission for /usr/bin/sudo command. #chmod u+s /usr/bin/sudo
Example:-
[root@testserver ~]# ls -al /usr/bin/sudo
-rwxr-xr-x 1 root root 697605 Mar 5 2014 /usr/bin/sudo
[root@testserver ~]# chmod u+s /usr/bin/sudo
[root@testserver ~]# ls -al /usr/bin/sudo
-rwsr-xr-x 1 root root 697605 Mar 5 2014 /usr/bin/sudo
No comments:
Post a Comment