It's installed! What next?

Here's a basic rundown of what to do after you've finally booted the sytem in "happy" mode (non-singleuser). Most of these are convenience issues, but some (like me) view these as a must-have.
Change the password for "root"
This is something that you need to do as soon as you log in for the first time. Log in as root and type "passwd" and follow the prompts. Do not forget this password. Doing so will require a reinstall, most likely (don't expect to find an exploit to help you out).

Rename that pesky ol' "toor" account
"toor" is the `alternate-root' account for NetBSD. It has the same privileges as root, particularly nuking all files. I recommend changing this account name to something closer to your own account name, like "johnroot" (if you log in as "john"). The easiest way to do this is type "vipw" while logged in as root and edit the "toor" entry on the second line. When done with vipw (:wq to get out, standard vi commands), type "passwd johnroot" (or whatever you used).

Decide where you want to put home directories
If you didn't create a specific /home partition, you'll need a place to put accounts, including your own. A simple method is to create /usr/home or /usr/local/home (whichever is largest) and symlink it to /home ("mkdir -p 755 /usr/home; ln -s /usr/home /home").

Make your own account
It is not a good idea to be stomping around on your newly installed system using the root account. Accidents happen, and in a complicated OS such as NetBSD, they can be quite fatal. Doing this is described here.

NEW FOR 1.5 -- You can add users by using useradd(8). Check out the manpage for it, it really is useful.

Also, you need to add yourself to group 0 ("wheel") in /etc/group. This will allow you to run "su" ("Switch User", which defaults to root) so that you do not need to log out and then log in as "root" or "johnroot" (see "toor" above).

Set the password for your individualized account
Once you have created a line for your account in /etc/passwd, you need to set the password for that account. Just type "passwd user" and follow the prompts.

Fix /tmp and /var/tmp
On some systems, /tmp is created 755 (drwxr-xr-x) owned by root. /tmp and /var/tmp needs to be 1777 (drwxrwxrwt) for users (including your own account) to be able to do simple things, such as vi. A simple "chmod 1777 /tmp" and "chmod -R 1777 /var/tmp" while you are logged in as root should fix this right up.

Set up networking, DNS, domain, and all of that good stuff
You need to edit the following files in /etc:
myname
This is the name of your machine. If you are setting up a machine as "foo.friendly.com", then you would insert "foo" here.

Alternatively, you can edit /etc/rc.conf and add the line:
       hostname="mybox"
       

mygate
This is the address of your default router. If you have a firewall at home, put its IP address here.

Alternatively, you can edit /etc/rc.conf and add the line:
       defaultroute="192.168.1.1"
       

hosts
This is the table of hosts. It is often used for local network information. It only needs to have localhost defined, but you can be as liberal with the entries as you desire. My setup looks like:
       # RFC 1918 specifies that these networks are "internal".
       # 10.0.0.0	10.255.255.255
       # 172.16.0.0	172.31.255.255
       # 192.168.0.0	192.168.255.255
       127.0.0.1	localhost localhost.warthog.com
       192.168.12.1	titan tapehost www
       192.168.12.100	voyager
       192.168.12.101	pioneer
       192.168.12.110	dasher console loghost
       

resolv.conf
DNS "resolver configuration file". This file dictates the rules of your system DNS binding. A simple setup for me is:
       lookup file bind
       nameserver 192.168.12.110
       nameserver 206.132.88.1
       domain warthog.com
       search warthog.com
       
Where 192.168.12.110 is my own nameserver and 206.132.88.1 is a nameserver out on the internet. An easy way to check to find out what your provider's DNS server's numeric IP address is, try (from any already-setup *nix machine) "nslookup -type=soa ns.myisp.com".
For information on the other lines, see "man resolv.conf"

ifconfig.* (hostname.* for 1.2 and older)
This needs to be set up if you have an ethernet card in your system. My i386 machine has an NE2000-compatable ethernet card, so the file I have is /etc/ifconfig.ne0. If you have a hard time figuring out which one is yours, "dmesg" may be able to help, just look for "address" with some hex-typed numbers in pairs separated with `:'. An example is:
       ne0 at isa0 port 0x340-0x35f irq 10
       ne0: NE2000 Ethernet
       ne0: Ethernet address 00:80:48:85:29:5e
       
Therefore, I have a file called "hostname.ne0" to match the device-type of my ethernet card, and it contains:
       "inet dasher netmask 0xffffff00"
       
/etc/rc.d/network has a block that describes the proper syntax for /etc/ifconfig.* files. In a nutshell, it is "addr_family hostname netmask netmask broadcast_addr options" with netmask being in hex (0xffffff00 is 255.255.255.0).

Install your favorite shell
Which shell you have is a matter of personal taste. The common robust free ones are bash, tcsh, and zsh. The usual deciding factor for many people is: which shell can I get support for from my friends? In which case, go with that shell. If you're basically out on your own, and aren't afraid of breaking tradition, I would suggest that you use zsh as your fundamental shell, but grab the other two and have them available. zsh ships with extensive printable documentation, and is more intuitive than the others. More about shells is available here. Installation notes taken when I compiled each of these are available here.

Compile a new kernel
Blah blah blah (more to come, including ptys)

Set up sendmail
Blah blah blah (more to come)


Rob Windsor is
windsor@pobox.comand http://www.pobox.com/~windsor/
Copyright © 1995 - 2003 Rob Windsor.
Reproduction or republication without written permission available provided proper credit is given for original work. Rob Windsor will not be responsible for third-party material.
$Id: what-next.html,v 1.5 2003/01/15 23:24:33 windsor Exp $