Solved

Unix Shell Programming - How to execute Program without interactive mode

Posted on 2004-09-08
2
273 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
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.

808 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