getusers - zMarch/Orc GitHub Wiki
getusers
Name
getusers - lists users in passwd with login shells
Synopsis
getusers
Description
getusers 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.
getusers lists the user names to stdout.
Example
Run the function. There are no command line arguments.
$ getusers
Files
The function reads
- the /etc/passwd file through the tool getent,
- the /etc/shells file direct.