Query

user_accounts

Print the usernames of all regular user accounts (UIDs >= UID_MIN).

Exit codes

  • 0: Always

Output on stdout

  • One username per line

user_uids

Print the UIDs of all regular user accounts (UIDs >= UID_MIN).

Exit codes

  • 0: Always

Output on stdout

  • One UID per line

user_uid

Print the UID of a named user.

Arguments

  • $1 (string): Username to look up

Exit codes

  • 0: User found
  • 1: No argument given or user not found

Output on stdout

  • UID of the user

user_gid

Print the primary GID of a named user.

Arguments

  • $1 (string): Username to look up

Exit codes

  • 0: User found
  • 1: No argument given or user not found

Output on stdout

  • Primary GID of the user

user_passwd_state

Print the password state for a user from /etc/shadow. Returns 'P' (password set), 'LK' (locked), or 'NP' (no password).

Arguments

  • $1 (string): Username to check

Exit codes

  • 0: Always

Output on stdout

  • 'P', 'LK', or 'NP'

sysuser_accounts

Print the usernames of all system accounts (UIDs < UID_MIN).

Exit codes

  • 0: Always

Output on stdout

  • One username per line

sysuser_uids

Print the UIDs of all system accounts (UIDs < UID_MIN).

Exit codes

  • 0: Always

Output on stdout

  • One UID per line

sysuser_uid

Print the UID of a named system account.

Arguments

  • $1 (string): Username to look up

Exit codes

  • 0: Account found
  • 1: No argument given or account not found

Output on stdout

  • UID of the account

sysuser_gid

Print the primary GID of a named system account. Alias of user_gid; GID lookup is identical regardless of account type.

Arguments

  • $1 (string): Username to look up

sysuser_passwd_state

Print the password state for a system account. Alias of user_passwd_state; lookup is identical regardless of account type.

Arguments

  • $1 (string): Username to check