Creating users, Adding virtual hosts and other apache changes – Nvidia FreeBSD Server to FreeBSD v2 Server User Manual
Page 4
Nvision.com, Inc.
Migrating from a FreeBSD Server to a FreeBSD v2 Server
Creating Users
Your first task after the shadow process is to create your users by running the addaccounts.pl
script. To do this:
1. SHH to your new FreeBSD v2 Server and in the command line, type:
% cd /.migrate/bin
%./addaccounts.pl accountname
where “accountname” is your old FreeBSD Server account owner.
This script creates all the user accounts that were on the old server and their home directories
at /home/username on the new server, with FTP and mail access and no shell access. Users
with FTP and mail access will be added to the ftp and mail groups respectively, and each user
will have a group created for them. The quota for each user remains as it was. If you want to
grant shell access to a user, run the pw command. An example follows:
% pw usermod joe –s /bin/csh
2. To check the amount of disk space being used by a specific user on your server, type:
% quota username
where “username” is the name of your user
Adding Virtual Hosts and Other Apache Changes
After you have added the users, re-create the Virtual Hosts that you are hosting. In the past
Virtual Hosts were generally stored in the vhosts directory for FreeBSD Server. For FreeBSD
v2 Server we strongly suggest that you associate each Virtual Host with a user and put the
Virtual Host site under that user’s home directory. For example, if you have a Virtual Host for
test2.com and bob owns that site you would want to add the site to user bob’s home directory.
You cannot simply copy over the httpd.conf file or the VirtualHost blocks of the httpd.conf
file. The format for each is completely different between a FreeBSD Server and a FreeBSD
v2 Server. You will need to run vaddhost again for each Virtual Host.
An example follows of how to add a Virtual Host with the best settings.
1. Connect to your FreeBSD v2 Server using SSH and type vaddhost.
2. Proceed through the script, supplying the requested information. Press Enter to accept
the [default values].
a. The user who is to be associated with the virtual host (subhosted domain). (Example:
bob)
b. Type y or press Enter if the information is correct.
c. Type the hostname (example: grizzles.com) and press Enter.
d. Type www. and the same domain name you just typed, and press Enter. (example:
www.grizzles.com)
e. Press Enter once more to move to the next step.
f. Type y or press Enter if the hostname information is correct.
g. Type the e-mail address of the Web site administrator and press Enter. The default
value is [email protected]. If accepted, the e-mail address of the Web site
administrator becomes [email protected].
h. Press Enter, then type the document root for this user.
(example: /home/joe/www/grizzles.biz)
Creating Users
1