LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 12:41 PM   #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, 12:43 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

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

man who

---------------------
Steve Stites
 
Old 10-10-2008, 03: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, 05: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, 05:12 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
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, 07: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, 10:08 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,819

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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, 11: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 11:45 AM.
 
Old 10-11-2008, 11: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, 11: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, 12:16 PM   #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, 07:48 PM   #12
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
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, 08: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, 10: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, 09:04 PM   #15
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
pscp is easier
 
  


Reply

Tags
linux, users


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


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