Skip to content

listusers

Ulrich Berntien edited this page Mar 26, 2019 · 3 revisions

listusers

Internal Orc function to be used in the Orc script.

Users of Orc should use the getusers function.

Name

listusers - lists users in passwd with login shells

Synopsis

listusers

Description

listusers lists all user in the passwd with a login shell.

A login shell is each program listed in the /etc/shells files. Users with shell nologin and false are never listed. Typical nologin and false are not in “shells”. But also if these programs are in the “shells” the user with this shells will be not listed.

listusers lists the user names to stdout.

Example

Run the function. There are no command line arguments.

$ listusers

Files

The function reads

  • the /etc/passwd file through the tool getent,
  • the /etc/shells file direct.