Hi guys,
In my script, I need to switch to another user to execute a command which I don't have the privilege to run. Actually the script copies a file from one directory to another. The script running user doesn't have the permission in target directory. So I need to switch to another user for the same. I tried 'su' command in unix.But it failed to accept the password.evenif I echo the password its prompting again for the password when it executes. Is there any way to achieve this functionality?. ... Please help
Thanks in advance,
Vipin C
In my script, I need to switch to another user to execute a command which I don't have the privilege to run. Actually the script copies a file from one directory to another. The script running user doesn't have the permission in target directory. So I need to switch to another user for the same. I tried 'su' command in unix.But it failed to accept the password.evenif I echo the password its prompting again for the password when it executes. Is there any way to achieve this functionality?. ... Please help
Thanks in advance,
Vipin C
Comment