System Administration Guide

How to Display a User's Login Status

  1. Become superuser.

  2. 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 login status for the specified user. username is a user's login name. Multiple login names must be specified as a comma-separated list.

    The logins command uses the local /etc/passwd file and the NIS or NIS+ password databases to obtain a user's login status.

Example--Displaying a User's Login Status

The following example displays login status for the user rimmer.


# logins -x -l rimmer
rimmer       500     staff           10   Arnold J. Rimmer
                     /export/home/rimmer
                     /bin/sh
                     PS 010170 10 7 -1

In this example,

rimmer

Identifies the user's login name. 

500

Identifies the UID (user ID). 

staff

Identifies the user's primary group. 

10

Identifies the GID (group ID). 

Arnold J. Rimmer

Identifies the comment. 

/export/home/rimmer

Identifies the user's home directory. 

/bin/sh

Identifies the login shell. 

PS 010170 10 7 -1

Specifies the password aging information: 

o Last date password was changed 

o Number of days required between changes 

o Number of days allowed before a change is required 

o Warning period