Sep 27, 2002 #1 desibhai Programmer Sep 25, 2002 5 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 Oct 27, 1998 1,065 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