As Tilghman advises, I would not place this password on the command line.
 (Even with me supposedly being the only person who can log onto this
machine.  Yes, I'm probably overly paranoid about security, but that helps
prevent very bad future headaches. :-) )

I don't even want to have the password in a root-only-access file, which I
did briefly consider trying.  That would save a lot of typing/mis-typing
though. lol

I've locked the machine down pretty hard for a desktop machine.  However,
you never know what exploit could be found.

Paul

On Fri, Feb 27, 2015 at 11:24 AM, Tilghman Lesher <tilgh...@meg.abyt.es>
wrote:

> I would advise against placing a password on the command line.  Unless
> you are certain that everybody with a login to your machine can be
> trusted not to use that password without authorization, then that
> password will remain in the processlist (viewable with ps) for the
> duration of the process.  I don't believe expect has a way to
> overwrite the command line buffer, which would be a way to mitigate
> the issue, though a race condition still exists.
>
> If you're wanting to do something along these lines, then a better way
> to go is to have the expect script set as suid or sgid, then have it
> read a file containing the password which is secured from public view
> to use.
>
> On Fri, Feb 27, 2015 at 9:58 AM, Brandon Oglesby <bogle...@gmail.com>
> wrote:
> > What about an expect script that takes your password as a parameter?
> >
> > On Fri, Feb 27, 2015 at 5:12 AM, Paul Boniol <paul.bon...@gmail.com>
> wrote:
> >>
> >> I need to run a provided program from the command line.
> >> It starts an X program.
> >> It then prompts for a password from the command line.
> >>
> >> I'd like to continue on at the command line after entering the password
> >> (rather than having to open another bash session) while the program
> >> continues to run.
> >>
> >> You can't just append ' &' because it asks for a password as input.  So
> it
> >> hangs the process, waiting for input.
> >>
> >> Call me nuts, but I don't like saving an important password in a local
> >> file, so I'm pretty sure redirecting STDIN is out.
> >>
> >> Is there any way to enter the password and then tell it to fork, from
> the
> >> command line?  (I don't think there is, but it would be really nice.)
> >>
> >> Paul
> >>
> >> --
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "NLUG" group.
> >> To post to this group, send email to nlug-talk@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> nlug-talk+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/nlug-talk?hl=en
> >>
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups
> >> "NLUG" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to nlug-talk+unsubscr...@googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > --
> > You received this message because you are subscribed to the Google Groups
> > "NLUG" group.
> > To post to this group, send email to nlug-talk@googlegroups.com
> > To unsubscribe from this group, send email to
> > nlug-talk+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/nlug-talk?hl=en
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "NLUG" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to nlug-talk+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Tilghman
>
> --
> --
> You received this message because you are subscribed to the Google Groups
> "NLUG" group.
> To post to this group, send email to nlug-talk@googlegroups.com
> To unsubscribe from this group, send email to
> nlug-talk+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nlug-talk?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "NLUG" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nlug-talk+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to nlug-talk@googlegroups.com
To unsubscribe from this group, send email to 
nlug-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nlug-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to