0
点赞
收藏
分享

微信扫一扫

sudo su 开机自启

echo "clouder ALL=NOPASSWD: /sbin/iptables-save" >>/etc/sudoers

Linux中让普通用户拥有超级用户权限的配置

chmod u+w /etc/sudoers
vim /etc/sudoers
找到这一行:"root ALL=(ALL) ALL"
jenkinsprod ALL=(ALL) NOPASSWD: ALL
在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是要改的用户名)
chmod u-w /etc/sudoers

 

su - root -c  "sh deploy_all.sh  /home/bpaas/ start"
su - root -c  "iptables -F"

chmod +x /etc/rc.local

 

用一个例子来演示会更加清晰



举报

相关推荐

0 条评论