The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to process the user id list in /etc/group? april Shell Programming and Scripting 4 02-13-2008 09:48 AM
Online user list script Necrologist Shell Programming and Scripting 4 09-10-2006 01:37 AM
Creating User Accounts from a list in file Laila Saif Shell Programming and Scripting 8 12-21-2005 07:23 AM
list of default umask by user Zlikos AIX 3 09-29-2005 05:15 AM
su - user... how to find out the list of users and their passwords.. yls177 UNIX for Dummies Questions & Answers 2 11-13-2002 03:07 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
user list

Hi,
I have root access on Linux red hat server.
How do I see the current user list and group they belong?

ThankS!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-02-2004
Registered User
 

Join Date: Aug 2004
Posts: 232
current list? Do you mean those who are currently logged in? try
who

If you mean the list of users, look at /etc/group
Reply With Quote
  #3 (permalink)  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
user name list

Sorry.
I mean the user name list and user group name list that have been set up the admin.
I just have root access but not a admin.
I want to change one of the user's password and I also want to see who have been set up as a user on this machine.
Reply With Quote
  #4 (permalink)  
Old 12-02-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Well, as long as you're not using NIS or anything like that, you could just do
cut -d':' -f1 /etc/passwd
to get the list of users, and then look at /etc/group to see group membership. As far as I recall on Redhat (I use SUSE myself), each user will also have a group associated with the account (with the same name as the username) - and this will be their primary group. /etc/group will list any "secondary" group memberships.

Cheers
ZB
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:17 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