Solved

Unix Shell Programming - How to execute Program without interactive mode

Posted on 2004-09-08
2
290 Views
Last Modified: 2010-04-17
Hi
I am writing a shell script for exeucting a program. This program needs password to execute. How to give the password to this program from shell script without interactive mode (so that script won't wait till user enter the password).

Please reply.

Regards
Kedar
0
Comment
Question by:Kedar_Acharya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 50 total points
ID: 12008643
Many methods are there.

(1)  Pass the password as a command line argument (insecure method)
(2)  Pass the name of a password file on the command line (not fool-proof but better than the previous one)
(3)  Give the execute permission only to the user whom you want to validate. That way the OS would validate him anyway when he tries logging into the system
0
 

Author Comment

by:Kedar_Acharya
ID: 12010494
Thanks for the information.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
Simple Linear Regression
Progress

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question