LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-16-2006, 10:15 AM   #1
kemplej
Member
 
Registered: Dec 2003
Posts: 235

Rep: Reputation: 30
Putting together a list of user accounts.


I am looking to put a list of all the user accounts I have (I have over 300 users) together into a txt file for viewing along with their name on their account (its for a isp). How would i do that?
 
Old 01-16-2006, 10:47 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Some systems assign users a UID>100, others UIDs are >500, or even 1000. Look what is the lowest UID for a regular user in your system. Let say it is above 1000, like mine.

Code:
cat /etc/passwd | awk -F: '{if ($3>1000) print $0}' | grep -Ev "nfsnobody|otherunwanteduser1|otherunwanteduser2" | awk -F: '{printf "%s - real name: %s\n", $1, $5}'

Last edited by marozsas; 01-16-2006 at 10:49 AM.
 
  


Reply



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
User Accounts Cool_Hand_Luke Linux - Newbie 6 08-24-2005 08:35 PM
Putting a user in charge of a group WolfRune Linux - Security 2 05-30-2005 09:54 AM
List all user accounts on a system? bullium Linux - General 2 04-18-2005 10:07 AM
User Accounts Kemik Linux - Newbie 13 01-12-2005 04:24 PM
User Accounts MrJoshua Linux - General 3 01-10-2003 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:50 AM.

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