Strange Going On with Crypt(1)

exptools at ihnp4.UUCP exptools at ihnp4.UUCP
Thu Jul 28 12:58:28 AEST 1983


I've noticed *strange* behaviour with crypt using pipes and shell scripts.
I'm running Unix (tm of course) 5.0 on a 3B20.

The command:	cat tt | cat | crypt
will work fine from the terminal, or in a shell script run in the current shell
(i.e with '.' or 'source').  However if it is run as a shell script, crypt
(after prompting and receiving the key) says 'crypt: cannot generate key'.  It
works ok if you only come from one pipe. Making the cat's unbuffered doesn't
matter.

I thought I'd trace down the problem, but crypt dies when it doesn't receive
the right string back from /usr/lib/makekey.  I could not locate the source
for this command, though I found makekey functions inline in both ed and vi
(I grepped *every* file in /usr/src too!). No makefile seems to excise that
function from the other sources so it can put it into the library!

Now the real tricky part.  It works just fine from one of my logins, but not
from another. The other has several /etc/passwd entries, but only 1 UID/GID
pair. The login I used was not the first login listed. Does makekey look at
this stuff?

Anyone have any ideas?  Mail to me, please, if you do.

			Tom Clark, Bell Labs, Naperville, Flatland, USA
			ihnp4!tsclark, ihnp4!expadmin, i[hwx]*!exptools



More information about the Comp.unix.wizards mailing list