Skip to content

Group membership checking tool, inspired by Jan Wolter's pwauth/unixgroup tools

License

Notifications You must be signed in to change notification settings

mikesmitty/unixgroup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

unixgroup

Group membership checking tool, inspired by Jan Wolter's pwauth/unixgroup tools

Usage

$ groups michael
michael users

Set the USER env variable to the user to be checked, and GROUP to a comma-separated list of groups to check against

$ export USER="michael"
$ export GROUP="testgroup,users,wheel"

Check the group membership

$ unixgroup
$ echo $?
0

Since the michael user account is in the "users" group it returns status 0

Exit Statuses

  • 0: User exists, and is a member of one of the specified groups
  • 1: User exists, but is not a member of any of the groups
  • 2: User does not exist (or primary group id is not numeric, e.g. Windows SID)
  • 3: USER environment variable is invalid
  • 4: GROUP environment variable is invalid

About

Group membership checking tool, inspired by Jan Wolter's pwauth/unixgroup tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages