HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)
u
userdbset(1M) userdbset(1M)
NAME
userdbset - modify information in the user database, /var/adm/userdb
SYNOPSIS
/usr/sbin/userdbset -u
name attr=value [attr
=value]...
/usr/sbin/userdbset -d -u
name [-i]
/usr/sbin/userdbset -d -u
name attr [attr]...
/usr/sbin/userdbset -d -a
attr [attr]...
/usr/sbin/userdbset
[-u name] -f filename
DESCRIPTION
userdbset modifies the per-user information residing in the user database,
/var/adm/userdb
.A
per-user value in the user database overrides any system-wide default configured in
/etc/default/security
. See userdb(4) and security(4) for more details about the user database and
system-wide defaults, respectively.
If one or more attr
=value arguments are specified on the command line,
userdbget initializes or
modifies each attribute specified by attr to the specified value for the specified user name.
Options
The following options are recognized:
-a Modify specified attributes for all users.
-d Delete attributes; the /etc/default/security
(see security(4)) system-wide
default will then apply. If one or more attr arguments are specified, only those attri-
butes are deleted. Otherwise, if no attr arguments are specified, all configurable attri-
butes are deleted for the specified user name.
-f filename Import the contents of filename into the user database. Each line in the data file,
filename, must be in the following format: username attr=value. The output of
userdbget is in this format and can be used as the input file. See the -f
example in
the EXAMPLES section.
-i Remove internal attributes in addition to the configurable ones. Internal attributes are
not user configurable and are normally modified only by programs that enforce system
security. The file /etc/security.dsc
indicates which attributes are configurable
and which are internal.
-u name Initialize, modify or delete specified attributes for the specified user name.
Notes
Only users who have read and write access to
/var/adm/userdb
can run userdbset.
userdbset validates attributes and attribute values based on information in /etc/security.dsc
.
The validation of an attribute fails if:
• Any specified attr is not listed in
/etc/security.dsc
.
•
/etc/security.dsc does not allow a per-user value for the attr.
• name is not a valid user.
•
/etc/security.dsc allows the attr only for local users, and name is not in /etc/passwd .
• The value of an attr is not within the range specified in
/etc/security.dsc.
RETURN VALUE
userdbset exits with one of the following values:
0 success
1 invalid user
2 invalid usage
3 insufficient permission to access the user database
4 file system error
5 invalid attribute; /etc/security.dsc does not allow a per-user value
6 an attribute value is not within the range specified in /etc/security.dsc
7
block overflow
8 entry overflow
588 Hewlett-Packard Company − 1 − HP-UX 11i Version 3: February 2007