HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Checking shadow based and non-shadow based HP
Operating System - HP-UX
1831185
Members
3137
Online
110021
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-10-2008 12:08 AM
04-10-2008 12:08 AM
Checking shadow based and non-shadow based HP
HI,
Is there some system call/ command to check if a given non-trusted HP machine has password stored in the shadow file or are they stored in he passwd file?
How can a program come to know about this?
Thanks in Advance
-Deo
Is there some system call/ command to check if a given non-trusted HP machine has password stored in the shadow file or are they stored in he passwd file?
How can a program come to know about this?
Thanks in Advance
-Deo
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2008 12:19 AM
04-10-2008 12:19 AM
Re: Checking shadow based and non-shadow based HP
Greetings,
A simple way would be to know if it has the required bundle and the file /etc/shadow exist...
swlist|grep Shadow
ll /etc/shadow
All the best
Victor
A simple way would be to know if it has the required bundle and the file /etc/shadow exist...
swlist|grep Shadow
ll /etc/shadow
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2008 01:17 AM
04-10-2008 01:17 AM
Re: Checking shadow based and non-shadow based HP
If the file /etc/shadow exists and the users' password fields in /etc/passwd contain just a single "x" character, passwords are definitely stored in /etc/shadow.
If some users have a single "x" in the password field of /etc/passwd and others have an encrypted password in it, the password file is in an invalid state and pwconv should be re-run to automatically create the necessary /etc/shadow entries and migrate the password data to that file. Based on a quick test, a non-shadow user account entry in a shadow-using machine simply does not work (=is equivalent to a locked account) until that is done.
If your application needs to check a password, you should not do it by directly reading /etc/password or /etc/shadow files: instead you could use the getpwent()/endpwent()/getspent()/endspent() functions. If these functions are not suitable for your needs, you should consider using the PAM API (see "man 3 pam" and the other manpages referred to by it).
MK
If some users have a single "x" in the password field of /etc/passwd and others have an encrypted password in it, the password file is in an invalid state and pwconv should be re-run to automatically create the necessary /etc/shadow entries and migrate the password data to that file. Based on a quick test, a non-shadow user account entry in a shadow-using machine simply does not work (=is equivalent to a locked account) until that is done.
If your application needs to check a password, you should not do it by directly reading /etc/password or /etc/shadow files: instead you could use the getpwent()/endpwent()/getspent()/endspent() functions. If these functions are not suitable for your needs, you should consider using the PAM API (see "man 3 pam" and the other manpages referred to by it).
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP