- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: can't get new crypt2() function to work
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
тАО09-23-2009 12:32 PM
тАО09-23-2009 12:32 PM
Re: can't get new crypt2() function to work
I'm glad to see that it finally works. Congrats!
Kind regards,
Kobylka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2009 12:37 PM
тАО09-23-2009 12:37 PM
Re: can't get new crypt2() function to work
# cat /tmp/encrypter.c
#include
#include
main()
{
char *username;
char *oldhash;
char *salt;
char *key;
char *hashstring;
username = "user1";
key = "mypass";
oldhash = "$6$"; /* "$6$" = SHA512, "aa" = 3DES */
salt = crypt2_passwd_salt(oldhash, username);
hashstring = crypt2(key, salt);
printf("username = %s\n", username);
printf("salt = %s\n", salt);
printf("key = %s\n", key);
printf("hashstring = %s\n", hashstring);
}
# cc +DD64 /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lsec
# /tmp/encrypter
username = user1
salt = $6$VSw26.nD
key = mypass
hashstring = $6$VSw26.nD$yAt6TGoOlc9DLUY341qs0Kqo8D8HXFvZicqTSltK0z6ayTJ/dj9pn7RbH
Q8mhC.t7QabgjRUg0Ts/QnKcAm7A1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2009 01:30 AM
тАО09-24-2009 01:30 AM
Re: can't get new crypt2() function to work
You can give points that sum more than 10, if multiple replies.
>kobylka: find $l -name '*.sl' -exec nm {} \; -print | grep -i -e crypt2 -e '^/'
You may want to use:
nm -pxNA to do more than one lib at a time:
find $l -name "lib*" -exec nm -pxAN +
> -L/usr/lib/hpux32
There is no need to specify the default lib path with -L, remove it. Let the driver select the correct path.
>It should work using just -L/usr/lib too.
Not for Integrity, there are no libs there and Darren showed it failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2009 04:52 AM
тАО09-24-2009 04:52 AM
Re: can't get new crypt2() function to work
> find $l -name "lib*" -exec nm -pxAN +
Thanks for pointing this out! The -A (-r) flags are quite useful in this situation!
> There is no need to specify the default lib path with -L, remove it. Let the driver select the correct path.
What confused me a lot was that:
# cc +DD64 /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib -lsec
resulted in a library named libsec.sl on Itanium hardware trying to be linked.
So we went along using
# cc +DD64 /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lsec
>>It should work using just -L/usr/lib too.
>Not for Integrity, there are no libs there and Darren showed it failing.
Thanks for clarification.
Dennis, always nice to meet you in posts :)
Kind regards,
Kobylka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2009 06:12 AM
тАО10-06-2009 06:12 AM
Re: can't get new crypt2() function to work
# cc +DD64 /tmp/encrypter2.c -o /tmp/encrypter2 -L/usr/lib/ -lsec
ld: Mismatched ABI (not an ELF file) for -lsec, found /usr/lib//libsec.sl
Fatal error.
# cc +DD64 /tmp/encrypter2.c -o /tmp/encrypter2 -L/usr/lib/hpux64 -lsec
# echo $?
0
I wish the /usr/lib option DID work. I would rather not platform-specific compiler options in the instructions accompanying my program, but it looks like I'll have to.
Darren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2009 07:13 AM
тАО10-06-2009 07:13 AM
Re: can't get new crypt2() function to work
Did you also confirm that you can leave out both?
>I wish the /usr/lib option DID work.
Why? There are no shlibs there for Integrity. And on Integrity, there can be 4 library directories.
>I would rather not platform-specific compiler options in the instructions accompanying my program
In this case you don't have too, since the driver will figure this out. And since +DD64 is already OS specific, the horse is already out of the barn.
- « Previous
- Next »