?
Solved

list all unix accounts and groups on a system

Posted on 2006-04-07
2
Medium Priority
?
465 Views
Last Modified: 2013-12-27
Could someone please provide me with the syntax for retrieving all unix accounts and groups on a system? - Thanks!
0
Comment
Question by:sikyala
2 Comments
 
LVL 14

Accepted Solution

by:
arthurjb earned 1000 total points
ID: 16402066
This really depends on how the accounts are being stored.

If you are using just the files the command is;  
cat /etc/passwd
cat /etc/group


If you are using nis then the command is;    
ypcat passwd
ypcat group

If you are using nis+ then the command is;  
niscat passwd.org_dir
niscat group.org_dir

Many systems use a combination of storage methods, so a machine may have accounts using both files and nis or nis+.
0
 

Author Comment

by:sikyala
ID: 16402091
This worked great. Thanks!

If you are using just the files the command is;  
cat /etc/passwd
cat /etc/group
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question