Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ptsfa!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: Destroying arguments Message-ID: <701@bsu-cs.UUCP> Date: Sat, 23-May-87 15:03:47 EDT Article-I.D.: bsu-cs.701 Posted: Sat May 23 15:03:47 1987 Date-Received: Sun, 24-May-87 01:27:50 EDT References: <292@osupyr.UUCP> <239@polyof.UUCP> <485@bene.UUCP> <6723@mimsy.UUCP> <1056@hropus.UUCP> <19590@sun.uucp> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Distribution: comp.unix.questions Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 22 In article <19590@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes: >If I wanted to pass a password safely to a program, I'd have the >program ask me for the password and I'd type it in! I once wanted to write a shell script that would invoke crypt. The shell script prompted for the password, then later invoked crypt and supplied the password to it. The problem I ran into was that there seemed to be no way (at that time, on a 4.2BSD system; I haven't tried recently under 4.3BSD) to let crypt read the password from the script. The only way seemed to be either to let crypt read it from the terminal or get it from a parameter. Reading from the terminal was not practical because I was using a script that encrypted a large number of files using the same password, and typing in the password multiple times is a pain. Supplying the password to crypt as a parameter was obviously unacceptable. I eventually gave up trying to do it from a shell script. It would probably have been necessary to write an executable program. -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi