- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- check if a certain password is set
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
08-19-2004 09:17 PM
08-19-2004 09:17 PM
i want to write a script which checks if a certain password is set for a user , for example if a standard password is set for the root account.
Has anyone an idea how I can check this easily???
Thanks in adavance for your help...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 09:25 PM
08-19-2004 09:25 PM
Re: check if a certain password is set
there is no automatic way to check if a determined password is given.
Best way is to run a crack tool against a copy of the /etc/passwd file.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 09:29 PM
08-19-2004 09:29 PM
Re: check if a certain password is set
Are you awre that with file /etc/default/security (starting from 11.0 OS) you can control certain checks/parameters about password?? man 4 security for details. Also if you convert to trusted system , you can control lot more options. man getprpw, modprw, modprdef and getprdef man pages.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 09:38 PM
08-19-2004 09:38 PM
Re: check if a certain password is set
I want to ensure that if someone reset the root passwd for maintenace and then forgot to change it, then someone will detect it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 09:39 PM
08-19-2004 09:39 PM
SolutionThe password field entry from /etc/passwd consists of an encrypted password plus a two character 'seed' for the crypt routine (see man 4 passwd) for full information.
Given the 'seed' and a plain text password (your standard password for instance), you can run crypt (man 2 crypt) to produce an encrypted password. If this matches the field in /etc/passwd then the plain text password is valid. This is the way that login validates the password and also how 'crack' programs work (they use dictionary lists and various algorithms to repeatedly call crypt to try to get a match).
In order to run crypt however, you'll either have to write a simple C program or use something like perl. You can't call crypt direct from a shell script.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 09:49 PM
08-19-2004 09:49 PM
Re: check if a certain password is set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 10:06 PM
08-19-2004 10:06 PM
Re: check if a certain password is set
Encrypted password for the password "Pass1234" in /etc/passwd is "oBtWkqOhozqyw". Here "oK" is the seed. If I would run echo "Pass1234oB"|/usr/lib/makekey
I should get oBtWkqOhozqyw...
But that does not work ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 10:06 PM
08-19-2004 10:06 PM
Re: check if a certain password is set
Encrypted password for the password "Pass1234" in /etc/passwd is "oBtWkqOhozqyw". Here "oB" is the seed. If I would run echo "Pass1234oB"|/usr/lib/makekey
I should get oBtWkqOhozqyw...
But that does not work ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 10:20 PM
08-19-2004 10:20 PM
Re: check if a certain password is set
But if you put that password, it will work.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2004 10:25 PM
08-19-2004 10:25 PM
Re: check if a certain password is set
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/crack-5.0/
http://www.openwall.com/john/
I never re-write something that some other coder, more smarter than me, has alredy done...
HTH,
Massimo