LoginSignup
0
1

More than 5 years have passed since last update.

さくらVPS sudo設定

Last updated at Posted at 2018-03-24

管理ユーザでログイン、または一般ユーザでログイン後、管理ユーザに変更。

sudoコマンドを使用したいユーザをwheelグループに追加。

# usermod -G wheel sampleuser

wheelグループに所属するユーザがsudoコマンドを使用できるように設定。

# visudo

%wheelの先頭に#がついてコメントアウトされている場合は、コメントアウトを削除。

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

sudoコマンドでnginxをインストールしてみる。

$ sudo yum install nginx

すると、

sampleuser は sudoers ファイル内にありません。この事象は記録・報告されます。

と、怒られる。

一度ssh接続を切って、再度ログインしsudoコマンドを打ってみる。

無事成功。

0
1
0

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
0
1