LoginSignup
22
23

More than 5 years have passed since last update.

centos7 sudo追加

Last updated at Posted at 2018-03-19

centos7 sudo追加

sudoは最初から使用できるものかと思っていましたが、最初に設定ファイルに登録する必要がある。

何も設定せずにsudo を使用すると
「sudoers ファイル内にありません」とエラーが出る。

■sudo設定手順
1,root権限のあるユーザもしくはrootでログインする。

2,「visudo」コマンドを実行する。

3,コメントを外す
## Allows people in group wheel to run all commands
#%wheel ALL=(ALL) ALL

## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
#%wheel ALL=(ALL) ALL

4,「usermod -G wheell ユーザ名」を実行して、ログアウト後、ログインすれば「sudo」が使える。

22
23
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
23