The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to view symbol table in unix saravanan_nitt High Level Programming 1 02-13-2008 09:02 PM
How to view ps and pdf file under unix vicky20000 UNIX for Dummies Questions & Answers 2 01-08-2004 07:47 PM
Unix code - how to view? What is it? peter.herlihy UNIX for Dummies Questions & Answers 2 08-23-2002 06:56 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2006
Registered User
 

Join Date: Jun 2006
Posts: 7
Question How to view users in unix

Hi,

Im newbie here and in unix as well. How can i view users in unix? Im viewed them in shadow file (i typed: vi /etc/shadow) but some unix (im confused if its unix or linux or bsd, but i think it has a little thing in common or differnce) has no shadow file?! What must i do to view the users list??? Pls help me!

Thanks! Your response is greatly appreciated!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-08-2006
Registered User
 

Join Date: Jun 2006
Posts: 7
By the way, if this question had been answered please redirect me to that topic. I tried to search my question here in our forum but i didnt see an answer to my question!

Thanks!

More power!
Reply With Quote
  #3 (permalink)  
Old 06-08-2006
Registered User
 

Join Date: Nov 2005
Location: cyberjaya
Posts: 85
/etc/passwd
Reply With Quote
  #4 (permalink)  
Old 06-08-2006
Registered User
 

Join Date: Jun 2006
Posts: 7
Thank you very much!
Reply With Quote
  #5 (permalink)  
Old 06-09-2006
Registered User
 

Join Date: Mar 2006
Location: South Yorkshire, UK
Posts: 114
Take care with vi and files like /etc/shadow and etc/password - they're sooo easy to break! If you've got a modern unix then "lsuser ALL" will give you a nice (safe) listing.

cheers
Reply With Quote
  #6 (permalink)  
Old 06-09-2006
Registered User
 

Join Date: Jun 2006
Posts: 7
Yeah, thats the first thing I heard about unix. "Almost all or even all files are not just file, they are system files so be carefull in deleting them".

Thanks thestevew for the info and reminders!
Reply With Quote
  #7 (permalink)  
Old 06-09-2006
Registered User
 

Join Date: Feb 2005
Location: Canada
Posts: 131
You can also use awk.

Code:
awk -F: '{ print $1 }' /etc/passwd
You can change the value to list anything from the password file. For example, this will show all UID in /etc/passwd file:

Code:
awk -F: '{ print $3 }' /etc/passwd
Reply With Quote
Google UNIX.COM
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0