DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Administering user accounts

Adding users on the command-line with useradd(1M)

You can add users with a simple command:

useradd username

Default values are used unless overridden by command-line options described in the useradd(1M).


NOTE: Defaults for useradd are defined in /etc/default/useradd. useradd ignores the defaults used by the Account Manager.

If you see this error message:

   uid number not aged sufficiently
It means you are attempting to assign a UID that was previously assigned and removed. Removed UIDs are set aside for a period as described in ``Limiting reuse of UIDs''. This prevents a UID from being reused and the new account having access to information and files belonging to the original user. You can override this restriction using the -i option, but this is not recommended.

Changing default values used by useradd(1M) and the Account Manager

In addition to the settings available from the Options -> User Defaults selection of the Account Manager, there are other parameters that can be set using the System Defaults Manager or on the command line with defadm(1M). These defaults apply both to the Accounts Manager and useradd(1M).

The syntax for the command-line is:

defadm useradd parameter=value

where the parameters are as shown in ``useradd(1M) default parameters''.

useradd(1M) default parameters

Parameter Function useradd option Example
SHELL login shell -s /usr/bin/sh
HOMEDIR home directory location -d /home
SKELDIR location of environment files -k /etc/skel
FORCED_PASS path of password generator -p -
GROUPID login group -g 1
INACT days until inactive account is locked -f 365
EXPIRE expiration date for account -e 12/31/99
AUDIT_MASK list of audit events -a bad_auth,passwd
For example, defadm useradd SHELL=/usr/bin/ksh changes the automatically supplied default shell to ksh. The useradd command offers another way to override the default environment parameters when you are creating a new user account and the login name associated with it. See useradd(1M) for complete descriptions of all available options.


NOTE: The system file entries created when you run the useradd command have a limit of 512 characters per line. If you specify long arguments to several options, you might exceed this limit.


WARNING: Changing default values may compromise systemwide security parameters set by the SCOadmin Security Manager.


Next topic: Deleting a user account
Previous topic: Adding, copying and modifying user accounts

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004