This section describes how to display user login information.
Display a user's login status by using the logins command.
# logins -x -l username |
-x |
Displays an extended set of login status information. |
-l username |
Displays the login status for the specified user. username is a user's login name. Multiple login names must be specified in a comma-separated list. |
The logins command uses the local /etc/passwd file and the name service password databases (if any) to obtain a user's login status. For more information, see the logins(1M) man page.
In the following example, the login status for the user rimmer is displayed.
# logins -x -l rimmer rimmer 500 staff 10 Arnold J. Rimmer /export/home/rimmer /bin/sh PS 010170 10 7 -1 |
You should make sure that all users have a valid password.
Become superuser or assume an equivalent role.
Display all users who have no passwords by using the logins command.
# logins -p |
The -p option displays a list of users with no passwords. The logins command uses the local /etc/passwd file and the name service password databases to obtain a user's login status.
The following example shows that the user pmorph does not have a password.
# logins -p pmorph 501 other 1 Polly Morph # |