Linux – Why there is a group member field in both /etc/group and /etc/gshadow

grouplinuxusers

I am learning more about Linux user and groups in depth and noticed fourth field in both /etc/gshadow/ and /etc/group are exactly same.

Do they have any difference or is there any special reason why it is duplicated in both file?

Best Answer

The 4th field is a list of users that are members of the identified group. You can get a description of these two files with

man 5 group  
man 5 gshadow  

I suspect the values in the two fields are the same for convenience. I don't offhand know what happens if the two lists are different.