*BSD News Article 48852


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!gatech!pirates!emory!nntp.msstate.edu!Ra.MsState.Edu!aak2
From: aak2@Ra.MsState.Edu (Atif Ahmad Khan)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How would you do this ?
Date: 15 Aug 1995 03:08:01 -0500
Organization: Mississippi State University
Lines: 28
Message-ID: <aak2.808473932@Ra.MsState.Edu>
References: <aak2.808401125@Ra.MsState.Edu> <FN.95Aug14232715@big-brother.pain.csrv.uidaho.edu>
NNTP-Posting-Host: ra.msstate.edu
X-Newsreader: NN version 6.5.0 #2 (NOV)

fn@pain.csrv.uidaho.edu (Faried Nawaz) writes:

>In article <aak2.808401125@Ra.MsState.Edu> aak2@Ra.MsState.Edu (Atif Ahmad Khan) writes:

>$ I put the command "start-my-program"  in file /etc/rc.local but don't
>$ know how to autmate enternig the password.  I can't be near the machine
>$ and remember to enter the password everytime it reboots.  Any help would
>$ be appreciated.  Thanks.

>if it takes the password from stdin, i guess you could

>echo password | /usr/whatever/program

>or something similar.

>of course, if anyone reads your /etc/rc.local, they have your password...


 The way I did it was create a file called doit.sh with read permission
 only to root with the above line and then ran :

/bin/sh /usr/local/bin/doit.sh

 Not at least not everybody can read that file and I can still execute
 the program just fine.  It works just great.

Atif Khan
aak2@ra.msstate.edu