From 6614d1702134473d8b96c739c1c61a78a4014bbc Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 17 Apr 2018 12:41:49 +0100 Subject: [PATCH] tests: explicit sudo rules to require password from sudo_nopw This account is used on Travis. It needs to be forced to type passwords in some cases --- tests/README.md | 11 ++++++++++- tests/data/001-mitogen.sudo | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/README.md b/tests/README.md index 29c436cf..f5bbbc41 100644 --- a/tests/README.md +++ b/tests/README.md @@ -56,7 +56,8 @@ also by Ansible's `osx_setup.yml`. `mitogen__has_sudo_nopw` The login password is "has_sudo_nopw_password". It can sudo to root without - supplying a password. + supplying a password. It has explicit sudoers rules forcing it to require a + password for other accounts. `mitogen__pw_required` The login password is "pw_required_password". When "sudo -u" is used to @@ -79,3 +80,11 @@ also by Ansible's `osx_setup.yml`. `mitogen__webapp` A plain old account with no sudo access, used as the target for fakessh tddests. + + +# Ansible Integration Test Environment + +The integration tests expect to be run against a either one of the Docker +images, or a similar target with the same set of UNIX accounts and sudo rules. + +The login account should be able to sudo to root witout a password. diff --git a/tests/data/001-mitogen.sudo b/tests/data/001-mitogen.sudo index 65d39df0..08e4fe9d 100644 --- a/tests/data/001-mitogen.sudo +++ b/tests/data/001-mitogen.sudo @@ -1,3 +1,6 @@ +mitogen__has_sudo_nopw ALL = (mitogen__pw_required) ALL +mitogen__has_sudo_nopw ALL = (mitogen__require_tty_pw_required) ALL + Defaults>mitogen__pw_required targetpw Defaults>mitogen__require_tty requiretty Defaults>mitogen__require_tty_pw_required requiretty,targetpw