Sep 27, 2002 #1 desibhai Programmer Joined Sep 25, 2002 Messages 5 Location AU I want to call another user login from inside a script and then want to execute few commands. After execution, I want to return back into my script. How can it be done.
I want to call another user login from inside a script and then want to execute few commands. After execution, I want to return back into my script. How can it be done.
Sep 27, 2002 #2 olded Programmer Joined Oct 27, 1998 Messages 1,065 Location US Hi: Use the su command: su - user -c "cd /tmp; pwd; read x" If you're not root, you're prompted for the user's password. man su for more info. Regards, Ed Upvote 0 Downvote
Hi: Use the su command: su - user -c "cd /tmp; pwd; read x" If you're not root, you're prompted for the user's password. man su for more info. Regards, Ed