SUSE Support

Here When You Need Us

How to identify users who have not logged in for a period of time

This document (000021128) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11

Situation

System administrators need to perform routine checks on users' login last login date/time.

Resolution

1. Log in to a host as root user or or non-root user with administrative privileges.
         
2. Open a terminal or command prompt.

3. Use the following command to list all users who usernames are retrieved from /etc/passwd file:
# cut -d: -f1 /etc/passwd
4. Use the following command to check last login record of each user to display the last login information, where <username> = actual username:
# lastlog -u <username>
5. Look at the "Last logon",  "Last login", or "Latest" column shown in the output to determine the last login for <username>.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021128
  • Creation Date: 04-Jul-2023
  • Modified Date:13-Sep-2023
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.