No of Users in Unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers No of Users in Unix
# 1  
Old 08-30-2008
Java No of Users in Unix

Hi All,

Is there any command or any way to find out no of users active in unix system without using any file(like /etc/password).

Help me please.
# 2  
Old 08-30-2008
The who command shows active users. Try either
Code:
who -q
#on linux
who --count

# 3  
Old 08-30-2008
who|wc -l
# 4  
Old 08-30-2008
on ksh it will show desire o/p
who -q
# 5  
Old 08-30-2008
Advanced 'who'

'who' is the normal way.

An alternative is the following which shows a list of userids that are active:
ps --no-headers -eo euser,ruser,suser,fuser | sort -u

both of these can be piped through 'wc -l' to count them
# 6  
Old 09-02-2008
Thank you all for ur valuable reply.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need to find the user id of all users in UNIX

I need to find all the unix user id's of all the users in unix... is there any such command... pl help out (6 Replies)
Discussion started by: Syed Imran
6 Replies

2. AIX

Migrating RHEL 5 UNIX users to AIX

Hi, I'm able to migrate UNIX users/groups from Solaris to AIX (with same password using 13-char encrypted password from shadow file) but no luck with RHEL 5 to AIX. I see encrypted password in RHEL 5 is bit lengthier than 13-char. Is there any way to convert encrypted password such that same... (1 Reply)
Discussion started by: reddyr
1 Replies

3. UNIX for Dummies Questions & Answers

list all commmands users can run on unix

Hi, I have an AIX server with sudo installed and working, but I want to do a script to list all permitted commands of all users.. is it possible? I tried with sudo -l -u $user but both options are not permitted. Any hint? Thanks ---------- Post updated at 06:51 AM ---------- Previous... (1 Reply)
Discussion started by: iga3725
1 Replies

4. What is on Your Mind?

Demographics of unix.com users

I notice that at certain times (evenings, Europe) and (more understandably) weekends the forums go slightly quiet. This got me thinking about where people who visit live. Is there anything that shows a breakdown of the demographic unix.com community? (2 Replies)
Discussion started by: Scott
2 Replies

5. UNIX for Dummies Questions & Answers

Finding out all users and their UNIX groups??

Is there a way to find out all users and the UNIX groups they belong to?? :) (3 Replies)
Discussion started by: Hangman2
3 Replies

6. UNIX Desktop Questions & Answers

Creating New Users in UNIX Machine !!!

Hi How to create users in the UNIX machine .... I am the ROOT and i want to create users with normal privileges . a) Please give the sequence of commands which i need to use. b) How to set their userid and passwords (3 Replies)
Discussion started by: skyineyes
3 Replies

7. UNIX for Dummies Questions & Answers

How to view users in unix

Hi, Im newbie here and in unix as well. How can i view users in unix? Im viewed them in shadow file (i typed: vi /etc/shadow) but some unix (im confused if its unix or linux or bsd, but i think it has a little thing in common or differnce) has no shadow file?! What must i do to view the users... (6 Replies)
Discussion started by: jerome
6 Replies

8. UNIX for Dummies Questions & Answers

UNIX help for Windows users?

Is there any sort of documentation that translates windows commands into linux commands? ...just the basic stuff that you would do on your win PC translated to linux? For example in windows to configure your network card you would... Settings > Control Panel > Network Connections > Local... (3 Replies)
Discussion started by: TINO
3 Replies

9. UNIX for Dummies Questions & Answers

users logging on to unix boxes

I have been asked to write a unix script to log and report all users logging on to our unix boxes as either the root or oracle users only on a 24 hour basis. This should trap the logon and logoff time,if possible what they are doing and their username. Thanks in Advance (2 Replies)
Discussion started by: irehman
2 Replies
Login or Register to Ask a Question