• sudo开发常用命令总结


    ansible ws -m "shell" -a "echo 'wangsong        ALL=(ALL)       NOPASSWD: /usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep, /usr/bin/vim, /bin/vi' >>/etc/sudoers"
    
    ansible ws -m "shell" -a "echo 'zhangyi        ALL=(ALL)       NOPASSWD: /usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep, /usr/bin/vim, /bin/vi' >>/etc/sudoers"
    
    ansible ws -m "shell" -a "echo 'Cmnd_Alias kfcj =/usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep' >>/etc/sudoers"
    
    ansible ws -m "shell" -a "echo 'Cmnd_Alias kfcj =/usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep' >>/etc/sudoers"
    ================
    ansible ws -m "shell" -a "echo 'Cmnd_Alias KFQX =/usr/local/bin/supervisorctl, /usr/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep, /usr/local/php/bin/php, /usr/bin/crontab, /usr/bin/python2.7, /usr/bin/python, /usr/bin/python3, /usr/bin/svn' >>/etc/sudoers"
    
    ansible ws -m "shell" -a "sed -i 's#/usr/bin/svn#/usr/bin/svn, /usr/bin/vim, /bin/vi, /etc/init.d/crond#g' /etc/sudoers"

    /usr/local/bin/supervisorctl,

    /usr/bin/supervisorctl,

    /bin/cat,

    /bin/ls,

    /usr/bin/head,

    /usr/bin/tail,

    /bin/grep,

    /usr/local/php/bin/php,

    /usr/bin/crontab,

    /usr/bin/python2.7,

    /usr/bin/python,

    /usr/bin/python3,

    /usr/bin/svn

    /usr/bin/vim, /bin/vi,   ====这个保留比较危险

    /etc/init.d/crond

    /bin/cp

    /bin/mv

  • 相关阅读:
    【数据结构】堆栈
    【数据结构】线性表
    【算法】最大子列和问题
    【算法】复杂度的渐近表示
    【算法】什么是好的算法
    【算法】什么是算法
    【数据结构】什么是数据结构
    MySQL数据备份脚本
    二进制安装MySQL-5.7.28
    搭建zabbix+grafana监控
  • 原文地址:https://www.cnblogs.com/gaoyuechen/p/9679661.html
Copyright © 2020-2023  润新知