freebsd web hosting

You can choose from four different methods of adding users.

The following table lists recommended directories for users, depending on their ftp, e-mail, shell, and Web privileges. (Users having shell access will have all other privileges as well.)

Directory Description

Directory Path

E-mail account home directory

/home/username

Web account directory

/home/username/www

Virtual hosted account directory

(required for FrontPage)

/home/username/domain

Non-anonymous FTP home directory

/home/username

Your choice

/usr/local/apache/some_directory


iManager

iManager is an easy-to-use point and click utility.

    1. Connect to your VPS v2 Virtual Server in a Web browser and log in to iManager.
    2. Click Tools and Wizards, and beside Users, click Add, and continue.

vadduser

vadduser works as a wizard (a script of simple step-by-step questions you answer).

    1. Type:

      % vadduser
    2. Press Enter to accept [the default values in square brackets] or supply appropriate answers to the following prompts:
      • Username
      • Password (twice)
      • User’s full name
      • User’s home directory
      • Account services, including ftp, web, e-mail, shell
      • Account quota

adduser

adduser is the system tool for adding users, and works as a wizard (a script of step-by-step questions you answer).

    1. Type:

      % adduser -s
    2. adduser works as a wizard; it provides the following options:
      • –v gives the verbose script in which you can set the defaults for subsequent users you will add in the future.
      • –s gives the basic script
    3. Press Enter to accept [default values] or supply appropriate answers to the following prompts:
      • Username
      • User’s full name
      • Shell
      • User’s home directory
      • UID
      • Login class (pressing Enter accepts default of all services)
      • Login group
      • Invite user into other groups?
      • Password (twice)
      • (Summary of user information) OK?
      • Add another user?

pw

Unlike vadduser and adduser, there is no wizard for pw. However, you can make changes using pw very quickly after you have become familiar with it.

    1. Type the following:
      #pw user add –n username –c “Full Name” –m –s /usr/local/bin/bash
      where username is replaced by a real name, and Full Name is replaced by the user’s full name. For example:
      #pw user add –n jack –c “Jack Frost” –m –s /usr/local/bin/bash
    2. When Password for the user appears, type the password. Type carefully! There is no password repeat prompt for accuracy.
Editing User Accounts

There are several ways to edit user accounts after they are created. One way is to use vedituser. See Chapters 2 and 3 for other ways to edit accounts.

vedituser

    1. Connect to your VPS v2 Virtual Server using SSH and type
      % vedituser
    2. To add a user without prompting, type the following:
      vedituser --login= --password=5pwd --fullname=" Schmoe"
      --services=ftp,mail --quota=50
      vedituser --login= --password=5pwd --fullname=" Schmoe"
      --services=ftp,shell,e-mail,web --shell=bash --quota=50
      See the vedituser man page for more information.

Users and Virtual Hosting

In this layered hierarchy of domains and users, it is important that you understand some terms: primary domain, virtual host, subhost, root user, Administrative user, and user.

The primary domain owns the server account and the IP address. It is the host, and its domain is the hostname. This is important to remember when your users configure their e-mail accounts. Depending on the mail program they configure, users might be prompted for the “hostname,” and should type the primary domain.

The primary domain hosts additional domains known as virtual hosts, or subhosts. The following graphic illustrates the relationship of the primary domain to its virtual hosts. All domains on a VPS v2 Virtual Server resolve to the same IP address.

windows web hosting

grizzles.biz
virtual host of IP
123.45
6.789.10

grizzles.biz
virtual host of IP
123.45
6.789.10

someFamily.org
virtual host of IP
123.456.789.10

someFamily.org
virtual host of IP
123.456.789.10

schleppers.info
virtual host of IP
123.456.789.10

schleppers.info
virtual host of IP
123.456.789.10

 


 

 

 

 

 

Consider the users associated with VPS v2 Virtual Server 123.456.789.10. Each user needs an account (directory), located under /home/username unless otherwise assigned. Users having FTP and e-mail privileges can send and receive e-mail and upload files to their own home directories /home/username.

The server makes no distinction between users and the domains they are actually associated with. Only privileges (access to services) and permissions (access to directories and files) determine the range of a user’s access.

If you ordered a VPS v2 Virtual Server, you have root access to the entire file system. As the root user, you can edit all files on the server. You can also log in using SSH, SFTP, and iManager. By default—for security reasons—the root user cannot use Telnet, FTP, POP or IMAP. Set up your own user account with these privileges, or su to the Administrative User account, who has these privileges by default.

As the Administrative User, you can receive all e-mail destined for root. You can also su to root. Likewise, you can use sudo to perform certain tasks as root, such as installing applications, creating specific directories, and editing specific files. See “Users, Privileges, and Switching Users”


Add a Virtual Host (subhosted domain)

It is important when setting up new subhosted accounts, to associate the Virtual Host (subhosted domain) with a real user account on your VPS v2 Virtual Server. This user account might be the name of the administrator, or it might be the generic 'vhost' user (which vaddhost creates the first time you run it without specifying a user).

By segregating your subhosted account in this way, you insulate yourself and the other accounts that might be hosted on your VPS v2 Virtual Server, from one another.

    1. Connect to your VPS v2 Virtual Server and add the individual users of the subhosted domain, using one of the methods described in the previous section of Step 4.
    2. See “Getting Started” to register or transfer your subhost’s domain to the nameservers your primary domain is associated with.
    3. Connect to your VPS v2 Virtual Server using SSH, type vaddhost, and proceed through the prompts.
      or
      Open iManager, click Tools and Wizards, and beside Virtual Host, click Add.
      Subhost information submitted in this step automatically updates the /www/conf/httpd.conf file.
      Note: Any changes to the /www/conf/httpd.conf file requires Apache to be restarted.
    4. Create virtmaps to prevent misdirection of mail. The VPS v2 Virtual Server has only one IP address, so all mail sent to the users on your server routes to that IP.

Messages for webmaster@grizzles.biz, webmaster@someFamily.org, and webmaster@schleppers.info require that you configure the /etc/mail/virtusertable file using any of several examples listed in the /etc/mail/virtusertable.sample file, so that each message is delivered to the correct Webmaster.

 

Hosting  ::  Web Design  :: Server Administration  ::  Tech Support  ::  Contacts
Data Centers  ::  Tier I Global IP Network  ::  SLA/Contracts  ::  Search  ::  Account Login