Select Options->Booting... in the Booter. If you want to boot single- user, check the box. To boot multi-user, uncheck the box.
adduserimplemented? or How do I add a new user?
To manually add a user, follow the steps below, or you can read the
adduser(8) man page for a more complete description of the process.
# passwd [username]
If, however, you actually have a large number of users, or you just prefer to use a script to do it, you might want to try Hubert Feyrer's (Hubert.Feyrer@rz.uni-regensburg.de) answer:
It's written in perl and might need some customizations.
Another possible solution
was suggested by Simon J. Gerraty (email@example.com), who writes:
This works fine on NetBSD, SunOS, Solaris, HP-UX and probably others. It will use vipw so file locking, etc. is not an issue, and will populate the user's home dir with default files if a suitable prototype directory is available. You can have it prompt you for user-id full name, or give it everything on the command line.
Keep in mind that none of these scripts are the "official" NetBSD
solution and I cannot guarantee they will work in the way you would like.
adduser(8) manual page is still the "official" answer.
Exit the single-user shell with "exit" or ctrl-D.
mount -u /. More than likely, you booted single-user which
mounts the Root filesystem read-only by default. This gives you a chance
to run fsck by hand before bringing the system up into multi-user. One
other way to mount all the filesystems in
/etc/fstab as read/write
is to use
However, the best way to do this is to go into multi-user mode by exiting
from your single-user shell. This will mount all of the filesystems in
/etc/fstab in whatever mode they are listed.
Only use fsck on an unmounted or read-only filesystem. Running fsck on a r/w filesystem is dangerous and could corrupt the filesystem. If you bring the system up into single-user mode, the system will be mounted read-only. From there you can do an
to check all filesystems before bringing the system up into multi-user mode. If the filesystem has previously been marked "clean," and you still want to check it, you can use the
If you do make any changes to the filesystem using fsck, it is probably best to type:
to reboot the machine immediately without syncing the disks.
shutdown -h now
Please note that this is one of the commands in NetBSD that seems to stop working on some machines from time to time. Occasionally it will hang before finishing the shutdown sequence. You can almost always reboot and shutdown in the Mac OS instead.
If rebooting does not work either, you might try running
go single-user, then run
sync to sync the disks, and finally power off
the machine manually. This should avoid filesystem damage.
shutdown -r now
Please note that this is another one of the commands that seems to stop working on some machines from time to time. The major symptom is that the machine will appear to reboot, then it will hang before actually restarting. Sometimes compiling a custom kernel with all the unnecessary devices deleted will fix the problem.
As a last resort to avoid power-cycling the machine and possible
file-system damage, you can
shutdown to single-user mode, run the
sync command to sync the disks, and then restart the Mac via the
programmer's switch or keyboard command.
See the question below on setting the correct time .
Here is a quick summary of how to correctly set the time and timezone under MacBSD:
ln -s /usr/share/zoneinfo/yourtimezone /etc/localtime)
The timezone specification in the kernel configuration file (via
options DST and
options TIMEZONE) is now obsolete. The proper
with a correctly set clock (and time zone in newer versions of the Date &
Time control panel) and Map control panel and the correct GMT bias in the
Booter described above should handle this just fine. Keep in mind that if
/usr directory is not on your root partition, you might want
to copy the zoneinfo file to
/etc/localtime instead of making a
link in order ensure that the file will be present even when your
/usr partition isn't mounted.
However, instead of setting the GMT bias in the Booter, you can also compile the offset in to the kernel with:
The default timezone is probably either EST or PST, so you may initially experience some warnings like:
until your filesystem has caught up with the local time.
Warning: Battery clock earlier than filesystem date
The following people helped with this one:
It is used for mounting the kernfs filesystem. See "man mount_kernfs".
It is used for mounting the procfs filesystem. Consult The Design and Implementation of the 4.3BSD UNIX Operating System by Leffler, McKusick, et al., p. 104-5, 436. Also see "man mount_procfs".
Use the "chfn" command. Or use
vipw to edit
Although NetBSD is fairly usable with almost no configuration file editing, it is useful to configure the following files:
/etc/rc.conf- this file controls what daemons are run on a multi-user boot. You'll need to at least set the "rc_configured" variable to "YES".
/etc/passwd- give yourself a password entry (use vipw)
/etc/group- be sure to put yourself in group wheel
/etc/myname- fully-qualified domain name of your host
/etc/motd- Message Of The Day, displayed upon user login
/etc/hosts- simple name to address mappings if you don't want to set up named, or don't know how
/etc/resolv.conf- configuration for the resolver, allowing you to do hostname lookups
/etc/hostname.xxx- where xxx is your primary network interface, should you have one. Its format documented in
/etc/netstart. This is the old way of configuring a network interface.
/etc/ifconfig.xxx- the new way of configuring a network interface. Should contain the arguments you would give to
/usr/share/skel/*- skeletal login files
In general, if there is some facility that you need to configure, there is probably a man page for it in section (5) of the man pages. You may find the rc.conf(5) manual page especially useful.
Thanks to Brian Gaeke (firstname.lastname@example.org) for much of the above information.
Check out the Recommended Reading section of the Meta-FAQ.
The *BSD FAQ also contains a lot of useful information on NetBSD administration.
Are you using an older GENERIC kernel? If so, this is your problem. The
GENERIC configuration did not have the NFSSERVER option set in its config
file until NetBSD 1.2E. You can either build your own kernel with this
option set (see
man 8 config for details on configuring your own
kernel, or look at the
Kernel building HOWTO
or get a more recent -current GENERIC kernel.
Several, you might want to:
fsckyour filesystem due to suspected corruption
Thanks to Ken Nakata (email@example.com) for the above answer.
/etc/motd, but a while after I changed it, something reset it to its original contents.
You need to change the part after the header (i.e. the kernel info line).
If you delete the header, then one of the tasks in
will overwrite your changes on boot.
Please see the answer below in the Communications and Networking section.
Table of contents of this chapter, General table of contents
Beginning of this Chapter