LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-10-2008, 11:41 AM   #1
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Rep: Reputation: 41
Smile # of users in linux


Hi all,
could anybody tell me how to check the number of users on a linux(RHEL5), as well as the brief statistics of every user.

Thank you in advance,
Kapil Bajpai.
 
Old 10-10-2008, 11:43 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Use the who command. See:

man who

---------------------
Steve Stites
 
Old 10-10-2008, 02:27 PM   #3
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
You might type "w"
man w
 
Old 10-10-2008, 04:07 PM   #4
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
Smile # of usres in linux

hi all,

thank you for your precious advice....

but what i wish to know is that whether we have any such measure/command to see all users on a linux machine, like we can see the current active user with 'man' or 'w' command.

Thank you
Kapil Bajpai.
 
Old 10-10-2008, 04:12 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by kapilbajpai88 View Post

what i wish to know is that whether we have any such measure/command to see all users on a linux machine, like we can see the current active user with 'man' or 'w' command.
who -q

-------------------
Steve Stites
 
Old 10-10-2008, 06:13 PM   #6
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
Smile # of user in Linux

Hi All,

Even Who -q shows only the current active user. I am interested in similar information off all the user in the same machine. For instance, I have 4 users on my RHEL5 machine, and i wish to know their brief statistics like 'w' command gives for the active user only.
I think i am clear now....

Thank you,
Kapil Bajpai.
 
Old 10-10-2008, 09:08 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
READ the output of
Code:
su - ( or sudo)
who --help
 --and --
man who
Quote:
~]# who --help
Usage: who [OPTION]... [ FILE | ARG1 ARG2 ]

-a, --all same as -b -d --login -p -r -t -T -u
-b, --boot time of last system boot
-d, --dead print dead processes
-H, --heading print line of column headings
-l, --login print system login processes
--lookup attempt to canonicalize hostnames via DNS
-m only hostname and user associated with stdin
-p, --process print active processes spawned by init
-q, --count all login names and number of users logged on
-r, --runlevel print current runlevel
-s, --short print only name, line, and time (default)
-t, --time print last system clock change
-T, -w, --mesg add user's message status as +, - or ?
-u, --users list users logged in
--message same as -T
--writable same as -T
--help display this help and exit
--version output version information and exit

If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common.
If ARG1 ARG2 given, -m presumed: `am i' or `mom likes' are usual.
 
Old 10-11-2008, 10:18 AM   #8
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
The commmands "w", "who" and "users" all deal with current users as opposed to "All".
if you do "ls /home" you should see a list of all users on the system.
Just did "apropos user" and found a Command "users-admin" that might help.

Last edited by john test; 10-11-2008 at 10:45 AM.
 
Old 10-11-2008, 10:44 AM   #9
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Yea "users-admin" gets it. Doesn't show current activity like "W" but shows info on real name etc - allows creation deletion and modification of user accounts
 
Old 10-12-2008, 10:30 AM   #10
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
# of users on linux

Hi John,
thanks for cool advice...will try this on monday, as linux machine is at my workplace..it seems that it will sove my query...
thanks again..

Kapil.

Quote:
Originally Posted by john test View Post
The commmands "w", "who" and "users" all deal with current users as opposed to "All".
if you do "ls /home" you should see a list of all users on the system.
Just did "apropos user" and found a Command "users-admin" that might help.
 
Old 10-12-2008, 11:16 AM   #11
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
You're welcome. Good luck with it!
 
Old 10-12-2008, 06:48 PM   #12
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
cat /ect/passwd will also print an ENTIRE list of users..... this includes all the deamon ones and things like nobody
 
Old 10-15-2008, 07:49 AM   #13
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Original Poster
Rep: Reputation: 41
Smile thanks

Hi There,
your advice worked, now i can see all users and will try to get their details as well.

I have another query, and i hope you can help me.."How can i copy a file from a windows machine into the RHEL5 machine?

Thank You in advance,
Kapil.
 
Old 10-15-2008, 09:19 AM   #14
srtechy
LQ Newbie
 
Registered: Apr 2005
Posts: 11

Rep: Reputation: 0
>> "How can i copy a file from a windows machine into the RHEL5 machine?

install putty on the windows box, and use "psftp"
or you can install ftp (yum install vsftpd; service vsftpd start) on the linux box, and from windows box, do ftp.
 
Old 10-15-2008, 08:04 PM   #15
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
pscp is easier
 
  


Reply

Tags
linux, users



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 setup FTP users only users on LInux Fedora Soujiro Linux - Newbie 8 09-13-2010 07:34 AM
Get REAL basic 2008 for Free for Linux Users (per Linux Format LXF107) jdmcdaniel3 SUSE / openSUSE 1 07-25-2008 09:42 AM
FreeBSD users vs Linux users introuble General 13 05-23-2006 04:19 AM
New Forum for Linux-Gurus[Programming/Administration] or Linux-Advanced Users [ Progr raees LQ Suggestions & Feedback 5 04-12-2005 07:35 PM

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

All times are GMT -5. The time now is 04:56 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
Open Source Consulting | Domain Registration