简体   繁体   中英

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 ie:

ssh newsshadmin@ip_address
su - root

this triggers the password prompt.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM