ksh program with password

Hi,
I am looking for a way to utilize password when the ksh program is launched.
What's the standard or best way to do it?

Thanks for your help!

hmm, there are many standard ways and it only depends on how secure you want it to be. Higher the security you want, higher will be the complexity in the script.
and if you just want to check some string stored in file, it will be easy but not so secure.

ok.
I'd like to know the more secure way to do it since I don't want to other people to see the password.

?

Take a look at sudo.

http://www.sudo.ws/sudo/

Cheers
ZB

Hi,
I kind of know about sudo command.
But I am looking for a fixed password for my program that could be hidden somewhere.

Can someone give me a hint about it?

Hmm, I overlooked your question. You said shell script. I bliv it wont be easy doing it in a shell script. You can use something like this

========================================
echo "Enter password: \c"
stty -echo
read a
echo "$a" > pwd.txt
crypt encry_key < pwd.txt > pwd.x
rm pwd.txt
stty echo
echo " Password is \c"
crypt encry_key < pwd.x

However, the problem here is the encryption key (encry_key or any other string) can be easily seen to those who can read the script. Any person who can execute this script can also read it, So in short anyone who can execute this script, can also know the encrption key and thus can also read the encrypted password file.
So, your best bet would be to resort to c programs.
But my knowledge is limited, may be someone on the forum has some good idea here