Solved

Ypcat passwd

Posted on 1998-09-07
2
1,242 Views
Last Modified: 2006-11-17
I need ypcat passwd to only give
me the users full name and no
other info. What switches do I
use????

Thanks
0
Comment
Question by:Lukemann
2 Comments
 
LVL 3

Accepted Solution

by:
braveheart earned 100 total points
ID: 2006899
There are no suitable switches but try piping it through nawk or awk or sed or cut. Here is a nawk example:

ypcat passwd | nawk -F: '{print $5}'

This assumes that the full user name appears in field 5 but it may be in a different field (delimited by ':') on your system.

You may also want to pipe it through uniq or sort -u.
0
 

Author Comment

by:Lukemann
ID: 2006900
I ended up using ypcat password | head | cut -d: -f5 | sort
to take out the names.  Using uniq is also a very good tip...
I need to find out who has multiple accounts and this will
come in handy

Thanks!!!!!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now