LoginSignup
1

More than 3 years have passed since last update.

CentOSでユーザを作成してパスワードを設定してユーザ一覧で確認する方法

Last updated at Posted at 2017-06-08

環境
OS : MacのVirtualBoxに作った仮想マシンのCentOS7

ユーザを作成する
ユーザを作成する
$ useradd {ユーザ名}

パスワードを設定する(rootの場合はユーザ名が不要)
$ passwd {ユーザ名}

Screen Shot 2017-06-08 at 21.30.11.png

ユーザ一覧で確認する
フォーマット
ユーザ名:パスワード:ユーザID:グループID:コメント:ホームディレクトリ:ログインシェル

$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
<省略>
mana:x:1000:1000:mana:/home/mana:/bin/bash
ponsuke:x:1001:1001::/home/ponsuke:/bin/bash
vboxadd:x:996:1::/var/run/vboxadd:/bin/false

出典

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
1