It is possible to change the user within a shell script by su - newuser
; but what if the newuser needs authentication. How can I provide the password within the shell script?
None of the users is root.
It is possible to change the user within a shell script by None of the users is root. |
|||
Using passwords in plain text files is not recommended. However, if no security risk is involved, create an |
|||
|
You cannot that I am aware of. You can schedule the job with cron for other users via Su. Besides you NEVER should put a wheel users password in a clear text file |
|||||
|
sudo
. Or do you want to prompt the user for a password? If so, can you assume that a user is logged in locally? – Gilles Mar 2 '12 at 22:45