Output of getent group
Similar to This question, but different result set, can anyone help me with the output of getent group
?
It's something like this:
groupname:x:0:
just not sure what the x:0:
signifies?
getent group <group_name>
queries the /etc/group
file and gets the entry for the mentioned group from the file.
The output format is:
group:password:GID:user(s)
-
group
is the group's name password
is the encrypted group password, empty field signifies no password,x
bit signifies the password is in the file/etc/gshadow
GID
is the Group IDuser(s)
is the list of users member of this group, empty means this group has no member.
Now, if you check the /etc/gshadow
file you will see that the group password is locked (!
or *
) in the password field, thats because the group password is not used. It's considered a security risk to have all members of the group share the same password. (At least i have never come across any implementation of gshadow
).