Users and Accounts Makronix is a machine for people: the installer creates one account for the person who uses it, and that account is in the groups a desktop needs. More accounts are added with NetBSD's user tools, and the same accounts appear at the login screen and in System Settings. Where the accounts live /etc/master.passwd is the real database; /etc/passwd is its public view, without the password hashes. Both are generated from the master file by pwd_mkdb8. The group database is /etc/group. Edit them with vipw8 and vi1 rather than with a text editor that does not know about the locks. Each account has a home directory, a login shell and a list of groups. A new account gets the files from /etc/skel, which is where a site puts its default .profile and desktop files. Adding an account # useradd -m -G wheel,operator,staff,users,dialer,games,wsrc \ -c "Full Name" -s /bin/sh name # passwd name useradd creates the home directory with , puts the account in the named groups and sets the shell. passwd then sets the password; without it the account cannot log in. The groups are the ones the installer uses: wheelMay use su to become root. operatorMay use the operator commands (shutdown, and the disk tools that are marked for it). staffThe usual group for files that a team shares. usersThe ordinary users of the machine. dialerMay use the serial ports and the modems. gamesMay write the games' score files. wsrcMay write the source tree under /usr/src. The same operation is in System Settings under Users; it asks for the administrator's password and writes the same files. Changing and removing an account # usermod -G wheel,operator,staff,users,dialer,games,wsrc name # chsh -s /usr/pkg/bin/ksh93 name # userdel -r name usermod changes the groups, the shell, the full name or the home directory; chsh changes the shell of the account that runs it. userdel -r removes the account and its home directory; without the files stay. A removed account leaves its files owned by a number; find them with find / -nouser -print before you delete anything else. Passwords Passwords are stored as hashes in /etc/master.passwd, which only root can read. A user changes their own with passwd; root changes another with passwd name. The password quality is the administrator's business: a desktop machine on a home network needs a different policy from a machine that is reachable from the Internet. If a password is lost, root sets a new one from a single-user boot or from another account in the wheel group. The fact that this is possible is the reason a machine left alone in a public place must be locked, not only logged out.