lid is a handy command-line tool for getting group membership of a user or list of users a group contains.
If you invoke lid just without any option, it will list groups containing the invoking user.
# lid
No user name specified, using root.
root(gid=0)
bin(gid=1)
daemon(gid=2)
sys(gid=3)
adm(gid=4)
disk(gid=6)
wheel(gid=10)
By default lid lists groups containing user name.
# lid mysql
mysql(gid=27)
with -g option lid lists users in a group.
# lid -g users
games(uid=12)
If you don't want to display user or group IDs then you should use -n or --onlynames options.
# lid -g -n bin
bin
root
daemon
Comments
Post a Comment