Reputation: 5311
I'm trying to figure out why after adding:
newsshadmin ALL=(ALL) ALL
to the /etc/sudoers
file on Centos I'm still asked for root password when trying to switch to root i.e.:
ssh newsshadmin@ip_address
su - root
this triggers the password prompt.
Upvotes: 0
Views: 482
Reputation: 206
To use sudoes is necessary to execute the sudo command before any other commands like that sudo su - root.
Another problem is the line you used to allow su command without password, this is the correct entry:
newsshadmin ALL=(ALL) NOPASSWD: NOPASSWD: ALL
Upvotes: 1