← Back to search

List Login Users from /etc/passwd

enumerationlinuxtool

Summary

Extract accounts with an interactive shell from /etc/passwd to build a list of real login users.

Walkthrough

Identify which local accounts have an interactive shell, since those are the realistic login/privesc targets.

Steps

  1. Grep /etc/passwd for lines ending in sh to filter out service accounts that use nologin/false.

Commands

bash

grep sh$ /etc/passwd