genforma/engage — Issue #12: Support user who has sudo access without required password
Author: jfischer
Created: 2012-01-31 18:55:12+00:00
State: open
Labels: enhancement

Currently, when running Engage as a non-root user for an install that requires root access, we always ask for the sudo password. This password is stored in the password database and used in subsequent sudo calls (e.g. see engage.utils.process.run_sudo_program). You can configure /etc/sudoers to allow sudo calls without prompting for a password. This is useful for unattended installs (e.g. our tests). To support this mode of operation, we need to do the following:

1. Add a function to engage.utils.process to test whether an sudo password is required
2. Change the sudo handling in engage.engine.password to skip the sudo password prompt if a password is not needed
3. There are various checks that the sudo password is non-null. We will have to change those (e.g. in action.py and the password mixin).

For step 2, perhaps we should still create an sudo password key in the password db, but with an empty value. That would distinguish from the case where we don't have sudo access at all.