From 461a2733e6962c6c61a6042e25a0b0d3fbec1b7f Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 5 Jun 2018 15:51:57 -0700 Subject: [PATCH] Make admin_users only contain root and toor because admin is used for non-privileged accounts This fixes one specific instance of failure to chown from a privileged account: https://github.com/ansible/ansible/issues/16052#issuecomment-384976615 Fixes #41160 --- changelogs/fragments/admin-users-default-change.yaml | 4 ++++ lib/ansible/utils/module_docs_fragments/shell_common.py | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/admin-users-default-change.yaml diff --git a/changelogs/fragments/admin-users-default-change.yaml b/changelogs/fragments/admin-users-default-change.yaml new file mode 100644 index 00000000000..12fc2cde78b --- /dev/null +++ b/changelogs/fragments/admin-users-default-change.yaml @@ -0,0 +1,4 @@ +--- +bugfixes: + - Changed the admin_users config option to not include "admin" by default as + admin is frequently used for a non-privileged account (https://github.com/ansible/ansible/pull/41164) diff --git a/lib/ansible/utils/module_docs_fragments/shell_common.py b/lib/ansible/utils/module_docs_fragments/shell_common.py index f82dc572e6a..5e80d9e0edc 100644 --- a/lib/ansible/utils/module_docs_fragments/shell_common.py +++ b/lib/ansible/utils/module_docs_fragments/shell_common.py @@ -47,9 +47,10 @@ options: - dictionary of environment variables and their values to use when executing commands. admin_users: type: list - default: ['root', 'toor', 'admin'] + default: ['root', 'toor'] description: - - list of users to be expected to have admin privileges, for BSD you might want to add 'toor' for windows 'Administrator'. + - list of users to be expected to have admin privileges. This is used by the controller to + determine how to share temporary files between the remote user and the become user. env: - name: ANSIBLE_ADMIN_USERS ini: