[Ilugc] Execting commands as different user
- From: mrugeshkarnik@xxxxxxxxx (Mrugesh Karnik)
- Date: Tue Jan 23 15:05:13 2007
On Tuesday 23 January 2007 14:38, Ashok Antony wrote:
Hi all,
I need a solution for this.
I am logged in as user1. If I want to execute some commands user2. what I
can do for this. but password everything has to be given from the script
only. user will not enter the password and all.
I want to loggin as user2 and execute ls and exit from user2 session.
But user will not enter the password and other thing. how can I do this ?
Use sudo or else, expect. But learning to use sudo is much easier than
learning to use expect.
--
----------------------------------------
Mrugesh Karnik
GPG Key 0xBA6F1DA8
Public key on
http://wwwkeys.pgp.net
----------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :
http://www.ae.iitm.ac.in/pipermail/ilugc/attachments/20070123/46c460e0/attachment.bin
Other related posts: