How to view users in unix | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

How to view users in unix

UNIX for Dummies Questions & Answers


Tags
linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-08-2006
jerome jerome is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 10 July 2006, 11:22 PM EDT
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Sponsored Links
    #2  
Old 06-08-2006
jerome jerome is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 10 July 2006, 11:22 PM EDT
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Sponsored Links
    #3  
Old 06-08-2006
ashterix ashterix is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 14 August 2008, 3:21 AM EDT
Location: cyberjaya
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
/etc/passwd
    #4  
Old 06-08-2006
jerome jerome is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 10 July 2006, 11:22 PM EDT
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you very much!
Sponsored Links
    #5  
Old 06-09-2006
thestevew thestevew is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 11 July 2008, 4:53 AM EDT
Location: South Yorkshire, UK
Posts: 114
Thanks: 0
Thanked 1 Time in 1 Post
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
Sponsored Links
    #6  
Old 06-09-2006
jerome jerome is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 10 July 2006, 11:22 PM EDT
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Sponsored Links
    #7  
Old 06-09-2006
qfwfq qfwfq is offline
Registered User
 
Join Date: Feb 2005
Last Activity: 12 February 2010, 2:54 PM EST
Location: Canada
Posts: 133
Thanks: 0
Thanked 0 Times in 0 Posts
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

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
View CrobJobs used by all users Perlbaby UNIX for Advanced & Expert Users 5 05-21-2012 04:51 PM
Shell script for to view all users & groups history in root kpoobathi Shell Programming and Scripting 5 08-02-2011 02:28 PM
How to view .tar file in unix sdosanjh UNIX for Advanced & Expert Users 3 10-27-2008 03:21 AM



All times are GMT -4. The time now is 08:43 AM.