Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > U

userdbget(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

userdbget — display information residing in the user database, /var/adm/userdb

SYNOPSIS

/usr/sbin/userdbget [-i] -u name [attr]...

/usr/sbin/userdbget [-i] -a [attr]...

DESCRIPTION

userdbget displays the per-user information residing in the user database as a sequence of attribute=value pairs. Each pair is printed on a separate line and is preceded by the username. A per-user value in the user database, /var/adm/userdb, 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 no attr arguments are specified on the command line, userdbget displays all configurable attributes of users in the user database. If one or more attr arguments are specified, userdbget displays only those attributes.

Options

The following options are recognized:

-a

Display attributes of all users in the user database.

-i

Display 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

Display attributes for only the specified user name.

Notes

Only users who have read and write access to /var/adm/userdb can run userdbget.

RETURN VALUE

userdbget 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, all attributes for user joe are printed. The audit flag for user joe is enabled. The display last login feature is disabled.

/usr/sbin/userdbget -u joe joe AUDIT_FLAG=1 joe DISPLAY_LAST_LOGIN=0

In the next example, only specific attributes are printed. The audit flag for user joe is enabled. No value is printed for MIN_PASSWORD_LENGTH, because that attribute is not defined for user joe; the minimum password length for user joe is the system-wide default defined in /etc/default/security (see security(4)).

/usr/sbin/userdbget -u joe AUDIT_FLAG MIN_PASSWORD_LENGTH joe AUDIT_FLAG=1

In the last example, userdbget prints all configurable attributes of all users in the user database.

/usr/sbin/userdbget -a joe AUDIT_FLAG=1 joe DISPLAY_LAST_LOGIN=0 jane ALLOW_NULL_PASSWORD=0 mike AUDIT_FLAG=0

FILES

/var/adm/userdb

user database

/etc/default/security

security defaults configuration file

/etc/security.dsc

security attributes description file

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.