Deploy fabric script to multiple users of a same machine
<p>Is it possible (and how) to run a fab script for multiple users on a same machine. For example, say I have users <code>user1</code> and <code>user2</code> on a remote machine and I want to use a fabfile that runs a bash script that uses the <code>$HOME</code> environment variable. I need to run the bash script twice, first as <code>user1</code> and then as <code>user2</code>.</p>

<p>Something like this? You could run multiple commands and add as many users as you need.</p>

<pre><code>for i in user1 user2 user3 ; do
  su -c "/some/directory/Script" ${i}
done
</code></pre>

python bash fabric