Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ adduser(8) — SunOS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

passwd(1)

chsh(1)

passwd(5)

vipw(8)

ADDUSER(8)  —  MAINTENANCE COMMANDS

NAME

adduser − procedure for adding new users

DESCRIPTION

A new user must choose a login name, which must not already appear in /etc/passwd.  An account can be added by editing a line into the passwd file; this must be done with the password file locked, for example, by using vipw(8).

A new user is given a group and user id.  User id’s should be distinct across a system, since they are used to control access to files.  Typically, users working on similar projects will be put in the same group.  System staff is group ‘10’ for historical reasons, and the super-user is in this group. 

A skeletal account for a new user ‘esmerelda’ would look like:

esmerelda::235:20:& Featherstonehaugh:/usr/esmerelda:/bin/csh

Fields in the password file have the following meanings:

1.Login name (‘esmerelda’). 

2.Encrypted password.  Set the user’s password with passwd(1).

3.User ID. 

4.Group ID. 

5.This field is called the ‘GCOS’ field (from earlier implementation of UNIX) and is traditionally used to hold the user’s full name.  Some installations have other information encoded in this field.  From this information we can tell that esmerelda’s real name is ‘Esmerelda Featherstonehaugh’.  The & here is a shorthand for the user’s login name. 

6.User’s home directory. 

7.Initial shell which this user will see on login.  If this field is empty, sh(1) is used as the initial shell.

It is useful to give new users some help in getting started, supplying them with a few skeletal files such as .profile if they use ‘/bin/sh’, or .cshrc and .login if they use ‘/bin/csh’.  New users should be given copies of these files which, for instance, arrange to use tset(1) automatically at each login.

FILES

/etc/passwdpassword file

SEE ALSO

passwd(1), chsh(1), passwd(5), vipw(8)

Sun Release 1.1  —  Last change: 6 March 1984

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026