[HOME] [github] [twitter] [blog] [fml4] [fml8] [北海道] Powered by NetBSD and [nuinui.net] .

ユーザを追加する (useradd コマンド)

ユーザ starbuck を、ユーザID 3001 番、グループ blue で作成する例:

ホームディレクトリ /home/starbuck も同時に作成するために、 オプション(-m -d /home/starbuck)もつけます。

% sudo useradd -g bsg -u 3001 -m -d /home/starbuck starbuck

確認しましょう。

Q: ユーザ starbuck が作成されているか?

% tail /etc/passwd
   ...
starbuck:x:3001:3000::/home/starbuck:/bin/sh

Q: /home/starbuck が作成されているか?

% ls -a /home/starbuck
. .. .bash_logout .bashrc .profile

[HOME] [github] [twitter] [blog] [fml4] [fml8] [北海道] Powered by NetBSD and [nuinui.net] .
Copyright (C) 1993-2022 Ken'ichi Fukamachi mail:< fukachan at fml.org >