[ SDF Public Access UNIX System .. Est. 1987 ]

join welcome faq status members projects store tour gopher abuse dialup dsl minecraft social
tilde nihongo europa webmail gallery usermap teach irc tutorials software telnet ssh



First Steps

User Accounts

After you have installed and started your NetBSD VPS, go to the console and log-in as user root with the default password, "root".

One of the first things you will want to do is change the default root password by typing passwd at the prompt. Don't forget this password as there is currently no way to recover it.

The default encryption algorithm for passwords is DES, so only the first eight characters will be used. You can change this by editing /etc/passwd.conf following the indications in man passwd.conf.

It is also a good habit to create a regular user account for working, using su to obtain root privileges as needed. To create a regular user account which is part of the administrative wheel group:

useradd -m -G wheel <username>

Then immediately set its password with:

passwd <username>

This user will be in the wheel group and will be able to perform administrative tasks by runing su to obtain superuser privileges using the root password.

System Clock

It is customary on UNIX systems for the system clock to be set to UTC. To set the local time zone, find your zone file in /usr/share/zoneinfo/ and link to it at /etc/localtime as follows:

ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime


Look at the first line of your control panel at vps.sdf.org and note YOUR_HOSTNAME (e.g. netbsd99), EXTERNAL_IP (e.g. 192.94.73.nnn), and INTERNAL_IP (e.g. 10.1.0.nnn):

VPS Maintenance Shell for netbsd99 (192.94.73.nnn / 10.1.0.nnn)
                          --------  -------------   ----------
                          ^         ^               ^
                          |         |               |
                          |         EXTERNAL_IP     INTERNAL_IP

Open /etc/rc.conf in an editor and, replacing the text YOUR_HOSTNAME, EXTERNAL_IP, and INTERNAL_IP with your own actual host name and IP numbers, add:

ifconfig_xennet0="inet EXTERNAL_IP netmask 0xffffff00"
ifconfig_xennet1="inet INTERNAL_IP netmask 0xffffff00"

Then put this in /etc/resolv.conf:


Add this to /etc/hosts:



/etc/rc.d/network restart


On NetBSD you can mount a pre-built (and still in progress) pkgsrc DESTDIR. Following the procedures below will effectively install the 2000+ included packages on your virtual NetBSD system.

Note that at the moment the pre-built pkgsrc assumes that its path is /images/pkg_neb501. Some programs won't work under a different prefix since they won't be able to find their shared libraries.

mkdir -p /images/pkg_neb501
rmdir /usr/pkg
ln -s /images/pkg_neb501 /usr/pkg
rm -rf /var/db/pkg
ln -s /images/pkg_neb501/db/pkg /var/db/pkg
mount -t nfs /images/pkg_neb501
export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin

It is read only.

To set this up on boot, execute the steps above and then:

echo "nfs_client=YES" >> /etc/rc.conf
echo "rpcbind=YES" >> /etc/rc.conf
echo " vps" >> /etc/hosts
echo "vps:/images/pkg_neb501 /images/pkg_neb501 nfs ro" >> /etc/fstab
echo "export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin" >> /etc/profile

Note that you cannot use both this pre-built pkgsrc and pre-built packages from netbsd.org. It may be possible to set the system up so you can, however this is best left to the experienced NetBSD administrator.

Miscellaneous Tips

Free up disk space by removing unwanted sets

The default image comes with all distribution sets installed. You can free up some disk space by removing the ones you don't need.

First, check which distribution sets are installed:

ls /etc/mtree

Decide which sets you want to remove and examine their contents. For example, to remove games and all X11 sets:

for set in games xbase xcomp xetc xfont xserver ; do \
  tar tzf /usr/INSTALL/$set.tgz | sed -e 's/^\.//' >> /tmp/purgelist ; \

After examining /tmp/purgelist and removing any files you want to keep, do:

cat /tmp/purgelist | xargs rm


$Id: VPS_NetBSD.html,v 1.21 2012/01/29 12:19:21 papa Exp $

©1987-2065 SDF Public Access UNIX System, Inc. 501(c)(7)
(this page was generated using ksh, sed and awk)