Creating and Editing User Accounts
Your private server enables you to create new users by manually editing the files that contain user information. To make the task easier, your private server supports commands which guide you through the process.
The vadduser command is a standard command with which to add user accounts. If you are not familiar with the command, however, it can be confusing. For more information on the command, refer to the manual pages.
To issue the vadduser command, connect to your private server by means of SSH and then type vadduser at the command prompt. The on screen instructions prompt you for the required information.
The vedituser command is a custom script that modifies an existing user account. You are prompted to modify the user information, including permissions and quota.
There are also several other tools that exist which you want to become familiar with. For more information about other tools, refer to the relevant manual pages.
- pw
- The pw command has numerous features that allow you to modify user information.
- quota
- View user quotas
- edquota
- Modify disk space and file number quotas for users.
- passwd
- Change a user password.
Because user account information is stored in several locations, including in compressed databases, it is important to use the tools listed above, rather than attempting to modify account information by editing the files directly.
When a user account is no longer needed, remove the account using the rmuser command. This gives you the option to keep or remove the home directory as well. Do not use this command to disable a user who you intend to reestablish at a later time. In those cases, it is better to change the password or to disable a user's privileges.
User information is stored in several different files on your private server. First, the /etc/passwd file contains a list of user names, along with some account information. The following is a sample entry for the user test:
test:*:1001:1001:Test User Account:/home/test:/usr/local/bin/tcsh
The entry contains seven fields in a colon (:) delimited list. The first field is the username, followed by an asterisk (*), which represents the password. As a security measure, passwords are not actually stored in the /etc/passwd file, so you see an asterisk instead. Next are two numbers, the User ID number and the Group ID number. These are used by the account to track file access and ownership rights. After the numbers, the real name or a description of the user account, followed by the user's home directory, and finally the shell they are allowed to use.
User passwords are stored in an encrypted format in the /etc/shadow file. This file is similar to the passwd file, although there are a few extra fields that the system uses.
Additional user information is stored in files such as /etc/group and /aquota.user.
Administrators can view users and user quota information. The vlistuser command displays a list of all the user accounts (excluding the system users). The following is an example of the output of the vlistuser command.
UserName FullNameHome DirectoryQuotas
-------- ------------------------------- ------------------------- ------
admin Administrative User /home/admin 47/0k
nobodyUnprivileged User /nonexistent 2036/0k
test Toast /home/testexampley 0/10240k
--------------------------------------------------------------------------
Totals: 2083/10240k

|