?
Solved

Ypcat passwd

Posted on 1998-09-07
2
Medium Priority
?
1,306 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 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

762 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