Output of getent group

21,661
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 ID

  • user(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).

Share:
21,661

Related videos on Youtube

twitchd8
Author by

twitchd8

Updated on September 18, 2022

Comments

  • twitchd8
    twitchd8 over 1 year

    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?

  • twitchd8
    twitchd8 over 7 years
    Thank you for the quick reply! This confirms what I thought, and expands on the assumptions that I made.