userdbset.1m (2010 09)
u
userdbset(1M) userdbset(1M)
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
9 database lock failure
10 database is disabled; see userdb (4)
11 invalid user name
12 not a local user
EXAMPLES
In the following example, the first command deletes all of the configurable attributes for user
joe, while
retaining the internal attributes. At this point, the system-wide defaults in
/etc/default/security
apply. The second command sets joe’s minimum password length to 7 and UMASK to 0022 (the leading
zero denotes an octal value).
/usr/sbin/userdbset -d -u joe
/usr/sbin/userdbset -u joe MIN_PASSWORD_LENGTH=7 UMASK=0022
The next command deletes the minimum password length, which causes the system-wide default to be
used.
/usr/sbin/userdbset -d -u amy MIN_PASSWORD_LENGTH
The following example deletes the user-specific audit flag for all users. The system-wide default will then
apply for all users.
/usr/sbin/userdbset -d -a AUDIT_FLAG
The following example saves the configurable attributes for all users (-a option) into a file,
saved_attributes.txt, using the userdbget command. If needed, the attributes can then be
restored at a later point by importing the file with userdbset. The second command imports the
configurable attributes into the user database.
/usr/sbin/userdbget -a > saved_attributes.txt
/usr/sbin/userdbset -f saved_attributes.txt
FILES
/var/adm/userdb user database
/etc/default/security security defaults configuration file
/etc/security.dsc security attributes description file
SEE ALSO
userdbck(1M), userdbget(1M), userdb_read(3), security(4), userdb(4), rbac(5).
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010