LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-28-2003, 12:15 AM   #1
mtest
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 22

Rep: Reputation: 15
how to find the number of users


can u tell how to find the number of users and their login names from root.

suppose if i issue ls /home. it is listing some other names such as lost+found, quota.user, quota.group etc along with the user names.
so can u tell how to find exactly the no of users in the system and their login names
 
Old 10-28-2003, 12:50 AM   #2
gwp
Newbie
 
Registered: Oct 2003
Location: South Africa
Distribution: Redhat, Fedora, Ubuntu
Posts: 27

Rep: Reputation: 15
Do a man on finger and who

#man finger
#man who

This will give all the options that you can use with these commands

try them:

# finger
# who

finger gives a lot more information, bu can be a security risk so could be disabled on your system. It seraches for files such as .plan, ..forward and .project to supply some
of the personal information

w is another one that you might want to check out

# w

BR

G
 
Old 10-28-2003, 02:27 AM   #3
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 32
Quote:
Originally posted by gwp
Do a man on finger and who
#man finger
#man who
This will give all the options that you can use with these
I suppose this will give the info about all users who are currently logged in ->

Users who are not logged in will not be got by these commands

Code:
cat /etc/passwd | awk -F ":" '{print $1}'
gives you all users . However system users i.e, shutdown,apache so on will also be exhibited
 
Old 10-28-2003, 02:41 AM   #4
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 32
Code:
cat /etc/passwd | awk -F ":" '{if($3>=500){print $1}}'
Maybe this will be a bit more near to what you want .
I suppose only "nfsnobody" is the user u don't want
 
  


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
number of users edgjerp Linux - Software 6 11-04-2005 02:34 AM
number of users in a group cookie_ie Programming 7 03-24-2005 03:43 PM
What's the maximum number of users on Linux? Kaj Linux - Newbie 5 11-29-2004 02:35 AM
number of users? Rick Winters Debian 5 06-21-2004 10:22 AM
Number of Linux Users liguorir Linux - Software 1 11-10-2003 10:24 AM


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