- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: user account
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 05:05 PM
12-20-2005 05:05 PM
user account
How to check the number of user account on a unix system ?
Mridul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 05:10 PM
12-20-2005 05:10 PM
Re: user account
who -u -> current logins.
cat /etc/passwd -> system and user logins.
There might be nis/ldap users. You will have to check it on nis/ldap server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 05:20 PM
12-20-2005 05:20 PM
Re: user account
Awadhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 05:21 PM
12-20-2005 05:21 PM
Re: user account
Dear Mridul,
To check the no of users logged in
#who -q
To check the no of user accounts in a server
#cat /etc/passwd | wc -l
With REgards,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 05:25 PM
12-20-2005 05:25 PM
Re: user account
-Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 05:38 PM
12-20-2005 05:38 PM
Re: user account
try logins
shri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 06:00 PM
12-20-2005 06:00 PM
Re: user account
You can use SAM to get the number of user accounts in a HP-UX server, or you can use "logins" to find it out, but it will display all NIS accounts if it is configured as primary
in /etc/nsswitch.conf
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 07:00 PM
12-20-2005 07:00 PM
Re: user account
My understanding is that you want to know the user number of an individual user. Try:
grep username /etc/passwd
where username is the id of the user. The third field is the user number.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 10:22 PM
12-20-2005 10:22 PM
Re: user account
you can try
#logins
#logins -s ( to findout the system users)
#logins -u ( to findout the normal user)
regards
tvs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 10:29 PM
12-20-2005 10:29 PM
Re: user account
if i did not misunderstand you ,you wanted
to know "number" of user?
Then;
logins|wc -l
cat -n /etc7passwd
listusers|wc -l
Good Luck,
Pls do not forget to submit points!!!
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 10:30 PM
12-20-2005 10:30 PM
Re: user account
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 08:36 PM
12-21-2005 08:36 PM
Re: user account
awk -F: '$2!="*" {i++};END {print i}' /etc/passwd
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 08:43 PM
12-21-2005 08:43 PM
Re: user account
Example:
# logins -u
smbnull 101 smbnull 101 DO NOT USE OR DELETE - needed by Samba
mysql 102 mysql 102
iwww 103 other 1
owww 104 other 1
muthu 105 users 20
If you want to count all here then simply as,
# logins -u | wc -l
To get real user accounts like muthu then you've to have UID information rage to give the count on that.
-Muthu