Virtual Private Server user accounts grant shell, e-mail, or FTP access, as well as giving a user the ability to publish Web content. Managing user accounts is a significant part of server administration.

Adding New Users

Creating new users can be done by manually editing the files that contain user information, but to make the job easier, there are two commands that will guide you through the process. You must be root to add or modify any user information.

adduser

The adduser command is the standard UNIX command to add user accounts. If you are not familiar with the command, however, it can be confusing. For more information on adduser, see the man page or check a UNIX manual.

vadduser

vadduser has been created for your VPS to make adding new accounts easier.

To run the vadduser command, you must log on to your VPS as root, then type vadduser at the command prompt. The on screen instructions will prompt you for the required information. see User Permissions for more information.

Modifying User Accounts

The vedituser command is a custom script that can be used to modify an existing user account. You will be prompted to modify the user information, including permissions and quota.

There are also several other tools that exist which you may want to become familiar with. For more information about these tools, see the relevant man page or a UNIX manual.

  • 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's password.

Because user account information is stored in several places, including in compressed databases, it is important to use the tools listed above, rather than trying to modify account information by editing any files directly.

NOTE: You need to specify the user when you run the passwd command. For example:

# passwd user1

Removing Users

When a user account is no longer needed, you can remove the account using the rmuser command. This will give you the option to keep or remove the home directory as well. It is not recommended to use this command to disable a user who you intend to re-enable at a later time. In those cases, it is better to change the password or to disable their privileges instead.

NOTE: The vrmuser command from VPS version 1 is now obsolete.

User Information Files

User information is stored in several different files on your Virtual Private Server. First, the /etc/passwd file contains a list of usernames, 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 will see the asterisk instead. Next are two numbers, the User ID number and the Group ID number. These are used by the system to track file access and ownership rights. After the numbers comes 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/master.passwd file. This file is similar to the passwd file, although there are a few extra fields that the system uses.

Both the passwd and the master.passwd files are duplicated in compressed database files named pwd.db and spwd.db respectively. These database files are used by many programs for authentication.

Additional user information is stored in files such as /etc/group and /user.quota.

vlistuser

We have provided a special tool for Virtual Private Server administrators to view their users and their quotas. The vlistuser command will display a list of all the user accounts (excluding the system users). The following is an example of the output of the vlistuser command.

UserName  FullName                        Home Directory            Quotas
--------  ------------------------------- ------------------------- ------------
admin     Administrative User             /home/admin               0/0k
nobody    Unprivileged user               /nonexistent              0/0k
test      toast                           /home/testboy             0/0k
--------------------------------------------------------------------------------
                                                            Totals: 0/0k

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771