0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntu Server 20.04.3 LTS 構築#18 アカウント設定

0
Posted at

実施日:2022/02/22~23

<<今回の内容>>
・アカウント追加とsudo権限付与

アカウント追加

先日、作成したアカウントでterminalが起動しなくなったため、アカウントを作成後、terminalが起動したときの話です。

# 下記のコマンドを実行するとアカウントが作成できます。
sudo adduser 作成するユーザー名
新しいパスワードを入力

しかし、これだけだとログインは出来ますが、terminal上でsudo権限で何かしようにもsudoグループに入っていないため
必要な作業が出来ません。

sudo権限付与

# sudo権限付与には下記のコマンドを実施する必要があります。
usermod -aG sudo ユーザー名
※他に追加したいグループがあればsudoの箇所を追加したいグループ名を入力して実行。

# 追加されたかの確認は下記のコマンドで確認が出来ます。
sudo whoami

# 再起動して、ログインすれば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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?