sudoers设置

将一个账号开通sudo权限

打开`vim /etc/sudoers`

找开`root`这一行,加上

`root ALL=(ALL:ALL) ALL`
`test ALL=(ALL:ALL)ALL`

#victor ALL = /bin/more /etc/shadow

#victor ALL = NOPASSWD: /bin/more /etc/shadow

#victor ALL=(ALL:ALL) ALL

`victor ALL=(ALL:ALL) NOPASSWD: ALL`

#yanisyu localhost=NOPASSWD:/sbin/init

#yanisyu localhost=NOPASSWD:/usr/sbin/useradd

`yanisyu ALL=(ALL) NOPASSWD: ALL`

    A+
发布日期:2020年10月17日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: