title: How to get groupname when I have the groupid
body: <p>I have the parameters (especially the userid and the groupid) of a file read with the <code>stat</code> command and I work in a network where the users and groups are specified on an ldap server. </p>
  
  <p>I've got the username out of the result of the command <code>getent passwd userid</code>.</p>
  
  <p>Now my idea was to get the groupname with <code>getent group groupid</code>, but this doesn't work.</p>
  
  <p>Can anyone tell me where I have my mistake or how I get the groupname?</p>
  
  <p>Thanks!</p>