grpusr
is a group querying tool that enables multiple lookups in a single query.
Instead of parsing the output of id
or the structure of /etc/group
, grpusr
accepts a simple syntax of the form
grpusr <groupname>:<username>[,...] [<groupname>:<username>[,...], ...]
If the user(s) belong to the group(s), grpusr
will return 0
, otherwise it will return 1
.
Examples
Does the "lxd" group contain user "daniel"?
grpusr lxd:daniel
yielding:
Group 'lxd' contains user 'daniel'
Does the "lxd" group contain users "daniel" and "backup"?
grpusr lxd:daniel,backup
yielding:
Group 'lxd' does not contain user 'backup'
Group 'lxd' contains user 'daniel'
Does the "lxd" group contain users "daniel" and "backup", and the "adm" group contain user "www-data"?
grpusr lxd:daniel,backup adm:www-data
yielding
Group 'adm' does not contain user 'www-data'
Group 'lxd' does not contain user 'backup'
Group 'lxd' contains user 'daniel'
Signatures
- The
grpusr_1.0.0_amd64.snap
signature can be found here. - The
grpusr_1.0.0_arm64.snap
signature can be found here.
Pseudo-SBOM
The lockfile can be found here.