一看必会系列:azure centos 禁用sudo 权限

No Comments AZURE

azure centos 禁用sudo 权限

修改 visudo ?
修改 vim /etc/sudoers ?

解决方案:

原生的各种方式都不生效。需要修改azure agent配置

修改方式 /etc/sudoers.d/waagent
chmod +w  /etc/sudoers.d/waagent

删除需要禁用sudo 的帐号
保存
文件权限变更为 非写权限
chmod -w /etc/sudoers.d/waagent

------中间广告---------

 

验证

-001 ~]$ sudo su –

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for dev:

发表评论