How can I get a list of linux users/group?
Posted
by Sergei
on Server Fault
See other posts from Server Fault
or by Sergei
Published on 2010-03-30T17:22:58Z
Indexed on
2010/03/30
17:43 UTC
Read the original article
Hit count: 300
Hello, guys,
I need to get and filter the linux users list like:
username1 username1_group
username2 username2_group
...
usernameN usernameN_group
I've tried, but only that I've found is:
cat /etc/passwd | grep /home | cut -d: -f1
It gives me the list of users in /home folder. But how can I add the group name to each of them?
Thanks in advance!
© Server Fault or respective owner