[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: crypt system call
On Wed, 9 Jun 1999, Kousik Bera wrote:
> Hi All,
> I am porting some c++ program from Solaris to Linux. One module uses the
> system call 'crypt'.
> When I try to compile the source, the linker(ld) is unable to link the
> 'crypt' code from the
crypt is not a system call, just a library function, I didnot compiled ur
program, but sure that U need to link crypt library.
gcc ur_c_code.c -lcrpyt
Will surly work.
Hey ppl on list, why is crypt is moved of libc. libc 5
has crypt with it, and gnulibc has a saperate library for crypt. Why ??
> call. There is no /etc/shadow file. /etc/passwd file is there, and all
U have to use 'pwconv' command to everything to the shadow password
format. This will create shadow passwd file.
And pwunconv back to normal.
> users and their encrypted passwords are listed there.
> So I guess Shadow-Password suite is not installed on my system.
> I am attaching a simple C test code and the linker output. Why 'crypt'
> call is giving this problem? If crypt call can't be used, are there any
> alternative method for password authentication programatically?
> BTW if I want to know, what is the source code name for say "cp", are
> there any way to find this info?
Assuming U are running RH
rpm -q -f `which cp`
Will give U an rpm file, say fileutils-3.16-9. now
fileutils-3.16-9-src.rpm is the source file, just get that from net.
- -Chetan S
___________
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.
-- George Bernard Shaw
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
Linux India is NOT a forum for Microsoft/India/Pakistan/US/UK bashing.
Flame baits will not be tolerated. If you can appreciate satire read
http://www.templetons.com/brad/emily.html
------------------------------