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
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
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-04-2002 04:15 AM
тАО09-04-2002 04:15 AM
I'd like to create a little C program that use the same crypt algorithm of passwd command.
The program must accept one argument that is the word to crypt and must return the encrypted word.
Do You could give me an Idea to do it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2002 04:16 AM
тАО09-04-2002 04:16 AM
Re: Crypt
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2002 04:37 AM
тАО09-04-2002 04:37 AM
Re: Crypt
I've found in man 3c crypt the crypt() function but I'd like to see some example to understand how use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2002 05:52 AM
тАО09-04-2002 05:52 AM
Solution1) Extract the 1st two characters of the existing password (old_passwd) hash - this is the 'salt'.
2) char *passwd2 = crypt(plaintext,salt);
3) if (strcmp(old_passwd,passwd2) == 0)
{
printf("Password okay\n");
}
When choosing a new password, you are advised to create a new salt value. The attached snippet will prove useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2002 05:16 AM
тАО09-05-2002 05:16 AM
Re: Crypt
If you need a cross-platform solution, I'd suggest looking at the source code to sudo (http://www.courtesan.com/sudo/) and wu-ftpd (http://www.wu-ftpd.org/).