setnetgrent (3) and, using getnetgrent (3) display the resulting string triple ( hostname , username , domainname ). Alternatively