redhat杂记

1、设置sudo权限:修改/etc/sudoers文件,找到root    ALL=(ALL)       ALL,在后面添加nginx ALL=(ALL) NOPASSWD: ALL

2、用sed命令在文件末尾添加一行:sudo sed -i '$a\nginx ALL=(ALL) NOPASSWD: ALL' /etc/sudoers

猜你喜欢

转载自www.cnblogs.com/badwood316/p/10069138.html