purazumakoiの[はてなブログ]

技術メモから最近はライフログも増えてきてます。

ユーザ追加方法

SSH接続の為に

ユーザを追加する。

# adduser
Username: others
Full name: others
Uid (Leave empty for default):
Login group [others]:
Login group is others. Invite others into other groups? []:
Login class [default]:
Shell (sh csh tcsh nologin) [sh]:
Home directory [/home/others]:
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password: パスワードを入れる
Enter password again:  パスワードを入れる
Lock out the account after creation? [no]:
Username   : others
Password   : *****
Full Name  : others
Uid        : 10009
Class      :
Groups     : others
Home       : /home/others
Shell      : /bin/sh
Locked     : no
OK? (yes/no): yes
adduser: INFO: Successfully added (others) to the user database.
Add another user? (yes/no): no
Goodbye!

rootになれるようにユーザのグループを変更

# pw usermod -n others -G wheel