/etc/sudosers
------------------------------------------------------------------ # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d ------------------------------------------------------------------
<user> ALL=(ALL:ALL) ALL
field | description |
---|---|
<user> | sudo を実行可とするユーザのID。 グループを設定する場合は "%"を先頭につける。 tty3 のように tty も指定出来る。 |
ALL= | ホストに対する許可(普通は ALL でよい) |
(ALL) | sudo されるユーザ名(ALL ならば全てのユーザ権限、つまり root 権限を使うことが出来る。 指定したユーザ<changed>に切り替えたい場合は (<changed>) のように記載する) |
ALL | 利用出来るコマンドの制限(ALL は括弧で括ったユーザの使える全てのコマンドを利用出来る) |