This will not only answer your question. It will also give you a general guide on how to get the source for whatever was included in a stock installation of Slackware 11.
You're running Slackware 11, yes?
You have the Slackware CD's, yes? There are 6 of those puppies.
Mount CD 4. On that CD, go to the source
directory. Read README.TXT
; it will give you general directions on how to find the source for anything distributed with Slackware 11.
The first step is to see what login
uses for passwords. So at your shell prompt, do a
You'll get this as output:
Remove that first slash and do this:
grep bin/login /var/log/packages/*
You'll get something like this:
The final line looks promising, yes?
is a little sketchy here. But take everything on that final line before the colon (":"), and look at that file:
grep LOCATION /var/log/packages/shadow-4.0.3-i486-13
You'll get output that looks like this:
PACKAGE LOCATION: /var/log/mount/slackware/a/shadow-4.0.3-i486-13.tgz
See that single letter that appears after the slackware/
? The "a"? Go to the source/a
directory on the CDROM. (Notice that not all letters are represented there. You may have to go to CD 5 or 6 for some letters, such as t
. And some of them are not single letters at all, but short strings such as tcl
. But in your situation, just stay with CD 4, because you can see that the CD directory source
contains subdirectory a
Do an ls
in that directory, and you'll see a shadow
subdirectory. Go to that directory and copy file shadow-4.0.3.tar.bz2
to someplace on your hard drive, preferably in a directory of its own. Then, in that directory:
tar -xvjf shadow-4.0.3.tar.bz2
Look around in the shadow-4.0.3/src
directory, and you'll find about 7 calls to function pw_encrypt
. That sounds close to what you want, right? But the function is only called here, not defined here. So close, but not yet!
Go back up to the shadow-4.0.3
directory and do this:
grep -lR pw_encrypt .
You'll get this:
Bob's your uncle.
Hope this helps.