File: //usr/share/doc/pwcrypt-1.2.2/README
crypt A command line interface to the crypt() function.
Installation:
./configure
make
make install
What:
This little program is designed to take a cleartext password via
either the command line, or stdin, ecrypt it vai the system crypt() function,
and produce the results on stdout.
Why?:
It is sometimes handy to be able to get an encrypted password as text
you can use in shell scripts. As nobody else had written such a utility as
this, the author obliged.
Uses:
This program can be used in any situation where you need the results
of the crypt() function on a piece of cleartext. For example, it's sometimes
desirable to be able to useradd -P`crypt password` when importing users from
a cleartext flatfile, or to maintain something like /etc/proftpd-passwd for
daemons such as proftpd which will allow you to user a special passwd file to
keep from having to give users system accounts when all you really want them
to be able to do is FTP their webpages to your server, and so-on.
Chances are, if you are interested enough to have gotten here, you
already know why you need this program, and how you should use it.
Notes:
This program _should_ compile/run on almost anything resembling UNIX,
although I have only tested with Linux. Hopefully some of you will give it a
try on some of the other UNIX flavors out there. It was written in plain old
C library function call's (no snprintf() or other things that are known to be
pesky on some UNIX'es (Solaris anyone?)), and it compiles clean with -W -Wall
-ansi -pedantic passed to the compiler, so I assume it is something like
reasonable code (I'm a self-taught programmer, so all bets are off if the
compiler lied :).
The use of /dev/[u]random to seed the salt generator is ridiculous
overkill for an application such as this. The author has done so both as a
learning process, and because he can.
Also, the documentation is not yet complete (nobody likes to write
documentation, me included), but what is there should be enough to get you
up to speed if you're at all familiar with UNIX or Linux.
--A.L.Lambert <al@xjack.org>