Hi,
I am having a problem running a script as a different user on a Solaris box. Basically i want to allow 'User2' to run 'ScriptX'. However, the script can only be run by 'User1' (for many reasons). So I would like to write an automated script to be run by 'User2' which logins into the system as 'User1' and then runs 'ScriptX'.
However, I am having a problems finding a way of passing both login and password to a Unix login command. For example, "su - User1" allows me to login as 'User1', though there is no way of passing the password that I can see. Can anyone help? Thanks!
Brandon
I am having a problem running a script as a different user on a Solaris box. Basically i want to allow 'User2' to run 'ScriptX'. However, the script can only be run by 'User1' (for many reasons). So I would like to write an automated script to be run by 'User2' which logins into the system as 'User1' and then runs 'ScriptX'.
However, I am having a problems finding a way of passing both login and password to a Unix login command. For example, "su - User1" allows me to login as 'User1', though there is no way of passing the password that I can see. Can anyone help? Thanks!
Brandon