Spencer Mark
Spencer Mark

Reputation: 5311

WHM with Centos : /etc/sudoers ALL=(ALL) - when switching to root still asks for root password

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

Answers (1)

Franciscon Santos
Franciscon Santos

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

Related Questions