LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2004, 06:40 AM   #1
nutthick
Member
 
Registered: Jun 2004
Distribution: Slack
Posts: 214

Rep: Reputation: 30
List all user details


Is there a command to list all user's current settings (command line) so I can find out their login, home directory etc.?

Thanks
 
Old 12-14-2004, 08:12 AM   #2
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
Take a look at the /etc/passwd file. It's got all that kind of info in it (cat /etc/fstab).

You'll have to be root. I wouldn't recommend editing it by hand either, unless you know what you're doing.
 
Old 12-14-2004, 08:15 AM   #3
nutthick
Member
 
Registered: Jun 2004
Distribution: Slack
Posts: 214

Original Poster
Rep: Reputation: 30
I was hoping there would be a 'userview' command. If there isn't I'll have to look in the passwd file.

Thanks
 
Old 12-14-2004, 08:25 AM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
you could do this:
put this into a file called userview
Code:
#!/bin/bash
#userview - view a user's credentials

cat /etc/passwd | grep $1

#EOF
Then do this (as root)
Code:
# chmod 755 userview
# mv userview /bin/userview
Then you have a userview command
simply
Code:
$ userview USERNAME
Aren't shell scripts great?

Last edited by scuzzman; 12-14-2004 at 08:26 AM.
 
Old 12-14-2004, 10:09 AM   #5
nutthick
Member
 
Registered: Jun 2004
Distribution: Slack
Posts: 214

Original Poster
Rep: Reputation: 30
I was wondernig when I'd come across scripts. Thanks scuzzman, I'll give it a try.
 
Old 01-13-2013, 07:00 PM   #6
andrewlorien
LQ Newbie
 
Registered: Jan 2004
Location: sydney .AU
Posts: 25

Rep: Reputation: 15
or you can use id

eg (on Solaris)
Code:
$ id
uid=101(andrew) gid=1(other)
(i know it's an old question, but it was my top google result for "linux show user details")
 
Old 01-13-2013, 11:27 PM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
There are few commands which are OS specific. For instance, in Solaris you have:-
Code:
~$ listusers [-g groups] [-l logins]
AND
~$ dispuid
Though these commands are not verbose, but helpful in fetching list of users.

On the other hand, you have one command i.e. finger to fetch all details of a users, and I consider it as best one for your requirement:-
Code:
~$ finger [username]
Moreover, for large number of users, you can create a simple script:-
Code:
#!/bin/bash
LIST=/tmp/list_of_user    # Contains a list of users, one per line
while read -r user
do
finger $user
done < $LIST

Last edited by shivaa; 01-13-2013 at 11:32 PM. Reason: Script added
 
Old 01-14-2013, 03:46 AM   #8
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
Originally Posted by nutthick View Post
Is there a command to list all user's current settings (command line) so I can find out their login, home directory etc.?

Thanks
man finger
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:14 PM
How to list files from a certain user?? Drunkalot Linux - General 1 06-20-2005 06:11 AM
PHP List /home/'user' then finger 'user' Caboose Programming 1 09-22-2004 05:12 AM
default user list PlatinumRik Linux - Security 1 04-27-2004 07:35 PM
DCgui User list mrsolo Linux - Software 1 05-10-2003 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration