【01: ユーザ追加】

サーバにアクセスするユーザを追加します。
ウィザード形式のコマンドを使用して容易に設定することが可能です。


% vadduser <Enter>

以下のようなメッセージが表示されます。
Please supply answers to the series of questions below. When a
`default answer' is available, it will follow the question in square
brackets. For example, the question:

What is your favorite color? [blue]:

has the default answer 'blue'. Accept the default (without any
extra typing!) by pressing the key -- or type your answer
and then press .

Use the key to erase and aid correction of any mistyped
answers -- before you press . Generally, once you press
you move onto the next question.

Once you've proceeded through all the questions, you will be given
the option of modifying your choices before any files are updated.

Hit ^C (Ctrl-C) at any time to quit without making changes.

Press to continue: <Enter>
一通りの説明が表示されますが、ここでは何も入力せずに <Enter> を押して下さい。

(1) 追加するユーザ名を入力します。
(1) User Name


Usernames consist of up to 16 alphanumeric characters, underscores and
hyphens, but may not begin with a hyphen. Uppercase letters are
discouraged in usernames.

Username: TEST <Enter>
ここで入力するユーザ名はTelnet、メール、FTP接続の際のユーザIDとなりメールアドレスの@以前の部分に相当します。
 
(2) 追加するユーザに対するパスワードを設定します。
(2) Password


Now, enter a password for this account.

For security reasons you may want to use a password that is longer than 6
characters and that has at least one non alphabetic character. The password
will *not* be echoed to the screen and you will be required to type it twice.

Password:  パスワードを入力 <Enter>
Retype new password:  再度パスワードを入力 <Enter>
入力するパスワードは、画面上では何も表示されませんが入力内容は認識されています。
確認のため2度同じパスワードを入力してください。

(3) ユーザのフルネームを設定します。
(3) User's Full Name


Now, enter the full name for this account.

Full Name:  testtest<Enter>
ここで指定するフルネームはユーザ管理のためでFTPやメールのユーザIDには関係ありません。

(4) 追加ユーザのホームディレクトリを設定します。
(4) Account Home Directory


Where would you like to put the home directory for this account?

Enter "1" for an account home directory: /home/test
Or enter in any custom path (beginning with /).

Select a number above or enter a path [1]: 1 <Enter>
デフォルトのパスは /home/username となりますので'1'を選択します
カスタマイズする場合はそのパスを入力します。

(5) ユーザに与える権限を設定します。
(5) Services


Please select the services that this account will be using:

ftp FTP services
mail Email services
shell shell login

Enter the service name (e.g., "ftp", "mail", etc.) to toggle that service for
the account. Hit when you are done selecting/deselecting services for
this user.
Select/deselect services [ftp mail shell]:
ユーザ権限は、デフォルト設定では、「FTP、Mail、shell」の全てが許可された状態になっています。
ユーザに与える権限を変更するには、 不許可にする権限を選択 する必要があります。

FTP : FTPクライアントソフトを使用したサーバへの接続を許可します。
Mail : username@domain.com というメールアドレスが使用可能となります。
shell : telnet(SSH)でサーバにログインするのに必要な権限となります 。
 
■shellを削りFTPとメールのみの使用を許可する場合。
Select/deselect services [ftp mail shell]: shell
↑shellを選択して、shell権限を不許可にします。

Select/deselect services [ftp mail]: <Enter>
↑FTPとMailの権限を残して、何も選択せずエンターキーを押し、権限の設定を完了させます。
■FTPの使用権限のみを許可する場合
Select/deselect services [ftp mail shell]: shell
↑shellを選択して、shell権限を不許可にします。

Select/deselect services [ftp mail]: mail
↑maillを選択して、mail権限を不許可にします。

Select/deselect services [ftp]: <Enter>
↑FTPの権限を残して、何も選択せずエンターキーを押し、権限の設定を完了させます。
■全て権限を使用許可とする場合
以下の表示のまま <Enter> してください
Select/deselect services [ftp mail shell]: <Enter>
上の(5)でshell権限をユーザに許可した場合はユーザの使用するシェルを下の7種類の中から選択することができます
Select a shell from the following list:

bash
csh
ksh
ksh93
sh
tcsh
zsh

Enter a shell: [tcsh]: <Enter>
"tcsh"がUNIXのFreeBSDでは多く使用されますので何も選択せずに <Enter> で "tcsh"が選択されます。
■ユーザに対するディスク容量制限を設定
(6) Quotas


Enter filesystem quotas for this user. The quota should be an integer
(no decimal fractions) in megabytes (e.g., 5 = 5 megabytes). Enter 0
for no quota.

Quota (in megabytes):
FTP、メール、Webの3つをあわせた容量制限の値です。
"0"を指定すると容量制限無しとなります。

Quota (in megabytes): 0 <Enter>
Account setup complete.
上のように表示されてユーザ追加の設定が完了です。