5
1

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 5 years have passed since last update.

Arch Linuxで非rootユーザーを作成する

Posted at

1.ユーザー作成

ルート権限で
useradd -m -g wheel -s [ログインシェル] [ユーザー名] でユーザ作成

2.ユーザのパスワードを設定

passwd [ユーザー名]

3.sudo をインストール

pacman -S sudo
visudoで# Defaults env_keep += "HOME" と # %wheel ALL=(ALL) ALL をコメントアウトして保存。

Defaults行は、sudoしたときユーザの$HOME を参照する設定。  %wheelwheel グループのユーザに sudo する権限を付与。

これらを終えたらexitして上記で作ったユーザーでログインができるか確認。

ちなみに

#グループ作成
groupadd [グループ名]

#ユーザー削除
userdel -r [ユーザー名]

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?