Solved

Ypcat passwd

Posted on 1998-09-07
2
1,271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using Grep to Find a file 8 118
auto mounter on hp-ux 2 65
Solaris 4.1.3 cloning and booting 13 95
aix unix tar error 3 87
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

739 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