LoginSignup
0
0

More than 5 years have passed since last update.

さくらVPS: 作業用アカウントをsudoユーザに追加する

Last updated at Posted at 2013-12-28

作業用アカウントでsudoを実行しようとすると….

前回作成した作業用アカウントでsudoコマンドを使おうとすると以下のようなエラーが発生します。

Chikaki — chkk525@www4057uo:~ — ssh 2013-12-28 10-40-06.png

chkk525 is not in sudoer file

とのこと。sudoer fileとはsudoコマンドを使用可能なユーザを定義するファイルで、

/etc/sudoer

に存在します。初期状態ではrootユーザのみが使用権限が設定されています。

/etc/sudoersの設定

一旦作業用アカウントから出てrootでログインします
直接 vim /etc/sudoersとするといろいろ不具合のもとになるので visudoというコマンドで設定していきます。

ssh root@xxx.xxx.xxx.xxx -p 
usermod -G wheel chkk525 ```
visudo 
## Allows people in group wheel to run all commands
%wheel ALL=(ALL)       ALL     

%を忘れて一瞬嵌った…

これで作業用アカウント(chkk525)からsudoが実行できるようになりました。

参考にしたサイト

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