2
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 PCを新しくクリーンインストールした後にコマンドラインからユーザを追加したり削除したりする際のコマンド

Last updated at Posted at 2022-06-26

ubuntu PCを新しくクリーンインストールした後にコマンドラインからユーザを追加したり削除したりする際のコマンド(N番煎じですみません、、)

ユーザ追加

sudo adduser testuser

sudo権が必要な場合は以下のようにする

sudo gpasswd -a testuser sudo

ユーザが切り替わるかを確認

su - testuser

sudo権があるかどうかを確認(なければエラーになるはず)

sudo apt update -y

パスワード変更

sudo passwd

ユーザ削除

不要になったユーザは以下の通り削除する

sudo userdel -r ユーザ名

参考

2
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
2
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?