LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   # of users in linux (https://www.linuxquestions.org/questions/linux-newbie-8/of-users-in-linux-675518/)

kapilbajpai88 10-10-2008 11:41 AM

# 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.

jailbait 10-10-2008 11:43 AM

Use the who command. See:

man who

---------------------
Steve Stites

john test 10-10-2008 02:27 PM

You might type "w"
man w

kapilbajpai88 10-10-2008 04:07 PM

# 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.

jailbait 10-10-2008 04:12 PM

Quote:

Originally Posted by kapilbajpai88 (Post 3306397)

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

kapilbajpai88 10-10-2008 06:13 PM

# 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.

John VV 10-10-2008 09:08 PM

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.


john test 10-11-2008 10:18 AM

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.

john test 10-11-2008 10:44 AM

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

kapilbajpai88 10-12-2008 10:30 AM

# 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 (Post 3306959)
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.


john test 10-12-2008 11:16 AM

You're welcome. Good luck with it!

dasy2k1 10-12-2008 06:48 PM

cat /ect/passwd will also print an ENTIRE list of users..... this includes all the deamon ones and things like nobody

kapilbajpai88 10-15-2008 07:49 AM

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.

srtechy 10-15-2008 09:19 AM

>> "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.

chrism01 10-15-2008 08:04 PM

pscp is easier


All times are GMT -5. The time now is 05:32 PM.