- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Query user id's whcih are non-expiry
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
Discussions
Discussions
Forums
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
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
тАО05-30-2011 01:47 AM
тАО05-30-2011 01:47 AM
I've a couple of questions
1) How can I query the user id's on my system that are non-expiring accounts? It is a hp-ux 11i non-trusted one.
2) The system has only 20 entries in the /etc/passwd feild, however the logins command shows nearly 1200 users. This is an NIS client as well. Are these 1200 users are NIS users? How can I list only local users using logins command?
Thanks in advance for all your quick help!!
Solved! Go to Solution.
- Tags:
- passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2011 04:33 AM
тАО05-30-2011 04:33 AM
Re: Query user id's whcih are non-expiry
>> This is an NIS client as well.
Since it is NIS client, your local passwd doesn't have any effect. All user login are from your NIS.
Shibin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2011 04:44 AM
тАО05-30-2011 04:44 AM
Re: Query user id's whcih are non-expiry
And, my actual questions were, 1)How can I list only local users using logins command?
2) How can I query the user id's on my system that are non-expiring accounts?
Thoughts?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2011 04:52 AM
тАО05-30-2011 04:52 AM
SolutionYou can always operate directly on /etc/password. If the password field doesn't have a ",", the password doesn't expire.
Or logins(1m) says to use: -r local
>2) How can I query the user IDs on my system that are non-expiring accounts?
logins -x, or scan the /etc/passwd file:
awk -F: '$2 !~ /,/ { print "No expiration:", $1}' /etc/passwd
Or for NIS:
ypcat passwd | (above awk)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2011 05:15 AM
тАО05-30-2011 05:15 AM
Re: Query user id's whcih are non-expiry
TestHost:/root#logins -r local
Usage: logins [-admopstux] [-g groups] [-l logins]
Mit freundlichen Gr├Г┬╝├Г en
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2011 05:34 AM
тАО05-30-2011 05:34 AM
Re: Query user id's whcih are non-expiry
11i has been retconned to mean any of 11.11 AND on. Next time please be more specific about your OS version and use the "uname -r" value. I was looking at the 11.31 man pages.
In regards to using awk, you may want to ignore all "system" IDs with a "*" in the password field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2011 05:08 AM
тАО06-16-2011 05:08 AM