I don't exactly need that you have specified. I don't want to prompt the user for a password. In my local system I run say two commands like "su hduser" which prompts me for a password and entering the password I get logged in as hduser. I just need to automate this thing using a script in my local system only so that I don't have to do this from the command line.
Thanks in advance any help would be of great help.