I have a problem when using Fabric to mimic my SSH workflow to deploy my web application.
Here\'s my usual flow of commands when I SSH to a server:
The way I achieve this is with
from fabric.api import settings
with settings(user='otheruser'):
...
You will be prompted for the password of otheruser, though only once. So it is not equivalent so sudo su otheruser, where root logs in to the user account without a password, but is is a simple way to switch between users in your script, only typing each password once