LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 12-14-2004, 05: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, 07:12 AM   #2
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 31
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, 07: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, 07:25 AM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 46
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 07:26 AM.
 
Old 12-14-2004, 09: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.
 
  


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


All times are GMT -5. The time now is 10:58 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration