LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-16-2008, 01:05 PM   #1
rainbow_bean
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Rep: Reputation: 0
How to list user information?


Does RedHad has a command like AIX: lsuser to list user information? such as group information?
 
Old 01-16-2008, 03:10 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Try "id". It might give you the information you are looking for.

HTH

Forrest
 
Old 01-16-2008, 06:13 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Depends exactly what you want to know.
As mentioned, if you are logged in as a user, 'id' will tell you about that user's current settings. See also env or set.
For all users check the /etc/passwd file eg
cat /etc/passwd
for group info
cat /etc/groups
both as root.
 
Old 01-16-2008, 06:16 PM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
finger is another one....

Code:
finger <user>
 
Old 01-16-2008, 07:32 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
'getent' is one seldom mentioned. Shame since it can query more databases next to passwd and groups: you can list all users like 'getent passwd' or grep for terms like 'getent services ssh' or 'getent aliases postmaster'.
 
Old 01-17-2008, 09:45 AM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
The command "id" will tell you about any user, not just the one logged in. You just have to pass the user you are looking for to the command as a parameter.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
Personal Information Manager (Kontact) does not show to-do list items in summary view marietechie Linux - Newbie 1 02-10-2007 11:06 AM
list users and user information MrSako Linux - Newbie 7 11-03-2006 09:24 PM
How to list hard drive information. tells Linux - Enterprise 4 01-26-2006 03:37 PM
clamd ERROR:Can't get information about user <USER> sailu_mvn Linux - Software 0 12-21-2005 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:06 PM.

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