339
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

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

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

ユーザ作成

# 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
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
339
Help us understand the problem. What are the problem?