Module system :: Class Shell
[hide private]
[frames] | no frames]

Class Shell

source code

Instance Methods [hide private]
tuple
run(self, cmd, user, password)
Run a shell command.
source code
Method Details [hide private]

run(self, cmd, user, password)

source code 

Run a shell command. The command is executed as: "su - <user> -c <cmd>" and the user/password is authenticated using PAM.

Parameters:
  • cmd (str) - The command & arguments.
  • user (str) - A user name.
  • password (str) - The password.
Returns: tuple
tuple (status, output)
Decorators:
  • @remote