403
346

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.

ubuntu ユーザを追加して sudo 権限をつける

Posted at

よく使うクセにすぐ忘れるのでメモ。

ユーザ作成

# adduser user_name

useradd はホームディレクトリが作成されない

Adding user `user_name' ...
Adding new group `user_name' (1002) ...
Adding new user `user_name' (1002) with group `user_name' ...
Creating home directory `/home/user_name' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:  # パスワード入力
Retype new UNIX password: # パスワード入力(確認)
passwd: password updated successfully
Changing the user information for user_name
Enter the new value, or press ENTER for the default
        Full Name []:    # Enter連打
        Room Number []: 
        Work Phone []: 
        Home Phone []: 
        Other []: 
Is the information correct? [Y/n] Y  # Yes
# 終了

sudo グループに追加

# gpasswd -a user_name sudo
Adding user user_name to group sudo
403
346
1

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
403
346

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?