- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: which users are activated
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
10-16-2007 04:02 AM
10-16-2007 04:02 AM
System: 9000 server
OS: hpux 11.0 and 11.11
From command line, how do I find out which user is activated and which one is not?
Thank you in advance for your help.
Tuan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 04:08 AM
10-16-2007 04:08 AM
Re: which users are activated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 04:37 AM
10-16-2007 04:37 AM
Re: which users are activated
passwd -sa
May be useful.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 04:41 AM
10-16-2007 04:41 AM
Re: which users are activated
Thanks for your prompt response. I look into SAM and see many accounts which are de-activated. However, logins -x shows PS on a de-activated accounts.
Any suggestion?
I appreciate your help.
Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 04:44 AM
10-16-2007 04:44 AM
Re: which users are activated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 04:45 AM
10-16-2007 04:45 AM
Re: which users are activated
Thank you for your response. passwd -sa also shows PS on deactivated accounts.
Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 04:53 AM
10-16-2007 04:53 AM
Solution#!/usr/bin/sh
listusers | awk '{print $1}' | while read U
do
LK=$(/usr/lbin/getprpw -r -m lockout ${U})
echo "${U}\t${LK}"
done
If the lockout field consists of all zero's then the account is active but if there is a '1' in any position; the account is locked/expired/... . The position of each '1' is significant as it relates to the specific reason for an account lock. Man getprpw for details and pay attention to the section that describes "lockout".
NOTE: Only your 11.11 box will have a man page for getprpw.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 05:02 AM
10-16-2007 05:02 AM
Re: which users are activated
You are super admin. Thank you very much for your help.
Again, I would like to thank everyone for your help. Points will be assigned shortly.
Tuan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 07:17 AM
10-16-2007 07:17 AM
Re: which users are activated
cat list of users into loop that executes the following for each.
getprpw -m lockout $user
then use the lockout code to determine.
i.e.
/usr/lbin/getprpw -m lockout $list|awk -F= '$2 != "0000000" {print "DEACTIVATED"}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 08:31 AM
10-16-2007 08:31 AM
Re: which users are activated
Thank you for your help.
Thank you, everyone.
Tuan