Solved

Ypcat passwd

Posted on 1998-09-07
2
1,262 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
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.

856 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