Skip to content

Commit

Permalink
Merge pull request #89 from conorsch/permit-filemap-config-on-etc-shadow
Browse files Browse the repository at this point in the history
Permits overriding permissions on /etc/shadow
  • Loading branch information
Sebastian Gumprich authored Jun 13, 2016
2 parents b5f4bac + d426138 commit cb54398
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ os_auth_sys_uid_max: 999
os_auth_sys_gid_min: 100
os_auth_sys_gid_max: 999

# Different distros use different standards for /etc/shadow perms, e.g.
# RHEL derivatives use root:root 0600, whereas Debian-based use root:shadow 0640.
# You must provide key/value pairs for owner, group, and mode if overriding.
os_shadow_perms:
owner: root
group: root
mode: "0600"

os_chfn_restrict: ''
# may contain: change_user
os_security_users_allow: []
Expand Down
2 changes: 1 addition & 1 deletion tasks/minimize_access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- '{{os_env_extra_user_paths}}'

- name: change shadow ownership to root and mode to 0600 | DTAG SEC Req 3.21-7
file: dest='/etc/shadow' owner=root group=root mode=0600
file: dest='/etc/shadow' owner={{ os_shadow_perms.owner }} group={{ os_shadow_perms.group }} mode={{ os_shadow_perms.mode }}

- name: change su-binary to only be accessible to user and group root
file: dest='/bin/su' owner=root group=root mode=0750
Expand Down

0 comments on commit cb54398

Please sign in to comment.