An Exploring South African

Things to do in Cape Town, the Helderberg, and the Cape Winelands

Menu

Skip to content
  • About
  • Explore

Ubuntu Server: How to See Group Members Tips, Tricks and Tutorials 12 JUN 2015

The scenario is this. Your file listing is showing you that a file belongs to a particular group, but now the next question that you have is what users are actually members of this group?

Well, getting this information via the command line terminal is pretty simple as it turns out – Just run the getent command:

getent group <GROUPNAME>

or

getent group <GROUPNAME> | awk -F: '{print $4}'

In case you aren’t familiar with getent:

“getent is a unix command that helps a user get entries in a number of important text files called databases. This includes the passwd and group databases which store user information – hence getent is a common way to look up user details on Unix. Since getent uses the same name service as the system, getent will show all information, including that gained from network information sources such as LDAP. The databases it searches in are: ahosts, ahostsv4, ahostsv6, aliases, ethers (Ethernet addresses), group, gshadow, hosts, netgroup, networks, passwd, protocols, rpc, services, and shadow.”

Easy peasy :)

diverse-group-of-users-standing-together-wearing-jeans

Related Link: https://en.wikipedia.org/wiki/Getent

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Related

Friday 12/06/2015Tips, Tricks and Tutorialsgetent, group, linux, terminal, ubuntu, user accountCraig Lotter

About Craig Lotter

Software developer, husband and dad to two little girls. Writer behind An Exploring South African. I don't have time for myself any more. View all posts by Craig Lotter →

Post navigation

← Solved: Image in div has a Thin Line Underneath Lunch at the Red Disa in the Harold Porter Botanical Gardens, Betty’s Bay (2015-05-03) →

An Exploring South African

Curiosity, travel, and discovering new places. Craig Lotter's An Exploring South African is primarily a South African travel blog of things to do in and around Cape Town, the Helderberg, and the Cape Winelands.

Craig Lötter

A South African software developer at Touchwork, Craig Lotter is a husband to a cake baker, father to two young girls, and someone who is constantly looking for new places to explore. He is also not that bad of a writer either.

   

Instagram

View from the dry and dusty (thanks Summer) hill that Durbanville Hills finds itself perched upon. #tablemountain #thetangram #tangram #tangramrestaurant #wineestate #durbanvillehills #durbanvillehillswine #durbanville #southafrica #anexploringsouthafrican
Pork Belly starter, Springbok Venison main, and of course a lot of wonderful Durbanville Hills wine. Great lunch out at The Tangram at Durbanville Hills wine estate. #venison #springbok #thetangram #tangram #tangramrestaurant #wineestate #durbanvillehills #durbanvillehillswine #durbanville #southafrica #anexploringsouthafrican
Work lunch engagement out at The Tangram @ Durbanville Hills wine estate. Definitely worth the drive! #thetangram #tangram #tangramrestaurant #wineestate #durbanvillehills #durbanvillehillswine #durbanville #southafrica #anexploringsouthafrican
Blue skies and softserve ice cream on the wall. #promenade #strandpromenade #beachwalk #beach #strandbeach #strand #helderberg #southafrica #anexploringsouthafrican
Beach soccer. #beachsoccer #soccer #beachwalk #beach #strandbeach #strand #helderberg #southafrica #anexploringsouthafrican
My tracks in the sand are more like footplods than footprints 😅 #beachwalk #sanddunes #beach #strandbeach #strand #helderberg #southafrica #anexploringsouthafrican

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new content via email.

Copyright © 2007-2021 Craig Lotter | Rugged Rock Studio | Proudly powered by WordPress