fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] How to switch to a account and run some commands.


From: santosh kumar
Subject: [Fab-user] How to switch to a account and run some commands.
Date: Mon, 9 Jan 2017 13:36:05 +0530

All,

I have a requirement where i need to do the following.

#su - oracle
once logged in as user oracle need to run some commands from there
$ id
$ whoami

so i can achieve this in shell in this formate

ssh <hostname>  'su - oracle' <<EOF
id
whoami
EOF

Please do let me know how can i achieve this on multiple nodes.

Thanks,
santosh D

reply via email to

[Prev in Thread] Current Thread [Next in Thread]