LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Closed Thread
  Search this Thread
Old 05-10-2004, 09:30 PM   #1
liguorir
Member
 
Registered: May 2003
Posts: 256

Rep: Reputation: 30
Question Crypt on SunOS


-------------------------------------------------------------------------
Here's my program...
-------------------------------------------------------------------------
#include <stdio.h>
#include <unistd.h>
#include <crypt.h>

int main (int argc, char **argv) {

char salt[] = "aa";
char *password;

/* Read in the user's password and encrypt it. */
password = crypt ( argv[1], salt);

/* Print the results. */
puts ( password );

return 0;
}


-------------------------------------------------------------------------
Here's my error...
-------------------------------------------------------------------------
[root@lserver tmp]# gcc -o go main.c
/tmp/ccsQikMK.o(.text+0x32): In function `main':
: undefined reference to `crypt'
collect2: ld returned 1 exit status

-------------------------------------------------------------------------
Any help?
-------------------------------------------------------------------------
 
Old 05-11-2004, 02:46 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Triple posting

Rules specifically state:

Do not post the same discussion in more than one forum. Duplicate discussions can be frustrating for other members. Try and pick the most relevant forum for your post. If you are unsure put it in Linux - General.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sunOS 5.5.1 and mounted folders FiveFlat Solaris / OpenSolaris 6 12-10-2004 02:06 PM
Solaris and SunOS czezz Solaris / OpenSolaris 1 11-15-2004 04:28 AM
printing in sunos yanger Linux - Software 0 07-21-2004 10:17 AM
SunOS C Compiler liguorir Linux - Software 1 05-10-2004 03:40 PM
SunOS 5.8, Samba 2.2.4 and winbindd?? BrianBr General 1 07-19-2002 06:32 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration