linux-users
Parses the /etc/passwd file to retrieve a list of user accounts registered on the Linux system. Returns the name, UID, GID, description, home directory path, and login shell information for each user as structured fields.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | Administrator |
| License usage | Licensed command |
| Parallel execution | Not supported |
| Distributed execution | Runs on Data Node (mapper) |
Syntax
linux-users
Output fields
| Field | Type | Description |
|---|---|---|
user | string | Username |
uid | integer | User ID (UID) |
gid | integer | Primary group ID (GID) |
description | string | User description (GECOS field) |
home_path | string | Home directory path |
shell | string | Login shell path (e.g., /bin/bash, /sbin/nologin) |
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
95040 | no-read-permission | Occurs when run without administrator privilege |
Runtime errors
| Error code | Message | Description | Post-action |
|---|---|---|---|
| - | - | When the /etc/passwd file cannot be read | Terminates query execution |
Description
The linux-users command parses each line of the /etc/passwd file using a colon (:) delimiter to extract user account information. It includes both system accounts and regular user accounts.
Examples
-
Retrieve all user accounts
linux-usersRetrieves information about all user accounts registered on the system.
-
Filter users who can log in
linux-users | search shell != "/sbin/nologin" and shell != "/bin/false"Filters only users whose login shell is neither
/sbin/nologinnor/bin/false. -
Retrieve regular users by UID
linux-users | search uid >= 1000Retrieves only regular user accounts with a UID of 1000 or higher.