Calvin's Tech Space

          成于堅忍,毀于浮躁

             :: 首頁 :: 聯系 :: 聚合  :: 管理
          # /etc/sudoers
          #
          # This file MUST be edited with the 'visudo' command as root.
          #
          # See the man page for details on how to write a sudoers file.
          #

          Defaults        env_reset

          # Host alias specification

          # User alias specification

          # Cmnd alias specification

          # User privilege specification
          # 針對每個用戶設定權限
          # 以下是指,對于root用戶,不論來自何方,可以切換到本機上的所有賬戶,并執行所有的命令。
          root    ALL=(ALL) ALL

          #calvin ALL=(ALL) NOPASSWD: ALL
          # Uncomment to allow members of group sudo to not need a password
          # (Note that later entries override this, so you might need to move
          # it further down)
          # %sudo ALL=NOPASSWD: ALL

          # Members of the admin group may gain root privileges

          # 加上%表明針對admin這個組來設定,由于calvin屬于admin組,因此如果在前面針對calvin這個用戶設定了NOPASSWD:,而在這里沒有設置,那么這里會覆蓋之前的設置,也就是說使用sudo時還是會要求輸入密碼。
          # 使用sudo -l可以查看自己在sudoer中的設定。
          %admin ALL=(ALL) NOPASSWD: ALL

          參考:http://sial.org/howto/sudo/
          posted on 2010-04-24 11:34 calvin 閱讀(145) 評論(0)  編輯  收藏 所屬分類: Linux
          主站蜘蛛池模板: 苗栗市| 成安县| 阳原县| 东明县| 永嘉县| 皋兰县| 安乡县| 湟源县| 方山县| 永城市| 班戈县| 永济市| 饶河县| 黑水县| 楚雄市| 东乡族自治县| 三门峡市| 安龙县| 金阳县| 彭阳县| 隆德县| 灵川县| 休宁县| 黑河市| 岫岩| 上林县| 高阳县| 绥德县| 增城市| 霍州市| 筠连县| 达尔| 尤溪县| 绥宁县| 独山县| 江都市| 柳江县| 江安县| 美姑县| 陕西省| 梁河县|