Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux list groups

cat /etc/group

cat /etc/groups | grep <groupname>
  
# Example:
cat /etc/groups | grep sudo
# Output
sudo:x:27:<user1>, <user2>, <user3>...

# sudo : group name
# x : password (encrypted for security reasons)
# 27 : could be another number, represents group ID
# list of users in group
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #linux #list #groups
ADD COMMENT
Topic
Name
9+3 =