Go to main content

Securing Systems and Attached Devices in Oracle® Solaris 11.4

Exit Print View

Updated: July 2019

How to Display the User's Login Status

Before You Begin

To use the logins command, you must become an administrator who is assigned either the User Management or the User Security rights profile. By default, the root role has this authorization. For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  • Display a user's login status by using the logins command.
    # logins -x -l username

    Displays an extended set of login status information.

    –l username

    Displays the login status for the specified user. The variable username is a user's login name. Multiple login names are separated by commas.

    The logins command uses the appropriate password database to obtain a user's login status. The database can be the local /etc/passwd file, or a password database for the naming service. For more information, see the logins(8) man page.

Example 6  Displaying a User's Login Status

In the following example, the login status for the user jdoe is displayed.

# logins -x -l jdoe
jdoe       500     staff           10   Jaylee Jaye Doe
PS 010103 10 7 -1

Identifies the user's login name.


Identifies the user ID (UID).


Identifies the user's primary group.


Identifies the group ID (GID).

Jaylee Jaye Doe

Identifies the comment.


Identifies the user's home directory.


Identifies the login shell.

PS 010170 10 7 -1

    Specifies the password aging information:

  • Last date that the password was changed

  • Number of days that are required between changes

  • Number of days before a change is required

  • Warning period