Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-28-2005, 02:36 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 11

Rep: Reputation: 0
how to filter output from passwd file

I would like to know how can I type a command to filter the output of the passwd file to only get the entries of the user name and userID, the purpose is for security, because only root has an ID of 0,
thanks for the response
Old 11-28-2005, 02:48 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
awk -F: '{print $1" "$3}' /etc/passwd

Old 11-28-2005, 05:17 PM   #3
LQ Newbie
Registered: Oct 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the quick response

hey, thanks for the answer, very helpful


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
php filter file name question feetyouwell Programming 1 01-31-2005 01:48 PM
how to open file in filter program? jayashrik Programming 1 01-26-2005 02:48 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 08:17 PM
How can I filter the output of grep to exclude certain cases? QtCoder Linux - General 1 03-28-2004 01:05 AM
How to filter lines from a text file Rascale Linux - Software 1 10-28-2003 01:46 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration