Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust permissions on shadow file on suse #311

Merged
merged 1 commit into from
Oct 5, 2020
Merged

adjust permissions on shadow file on suse #311

merged 1 commit into from
Oct 5, 2020

Conversation

rndmh3ro
Copy link
Member

this brings the task in line with the baseline.

Signed-off-by: Sebastian Gumprich [email protected]

@rndmh3ro rndmh3ro added the patch label Sep 20, 2020
@rndmh3ro rndmh3ro requested a review from schurzi September 20, 2020 19:57
@schurzi
Copy link
Contributor

schurzi commented Sep 20, 2020

I don't understand, the baseline reports:

     ×  File /etc/shadow group is expected to eq "root"
     expected: "root"
          got: "shadow"
     (compared using ==)
     ×  File /etc/shadow is expected not to be readable by group
     expected File /etc/shadow not to be readable by group```

@rndmh3ro
Copy link
Member Author

rndmh3ro commented Sep 21, 2020

Funny, when I run this locally I get:

            "     ×  File /etc/shadow group is expected to eq \"shadow\"",
            "     ",
            "     expected: \"shadow\"",
            "          got: \"root\"",
            "     ",
            "     (compared using ==)",

Here it says that it should be shadow: https://github.com/dev-sec/linux-baseline/blob/master/controls/os_spec.rb#L27

But the cinc-auditor does not think that this is a suse system:

You are currently running on:

    Name:      linux
    Families:  linux, unix, os
    Release:   unknown
    Arch:      x86_64

When running this with our collection, we do this:

    - name: install fake SuSE-release for cinc compatibility
      copy:
        content: |
          openSUSE Faked Enterprise 2020 (x86_64)
          VERSION = 2020
          CODENAME = Faked Feature
        dest: /etc/SuSE-release
        owner: root
        group: root
        mode: '0444'
      when: ansible_facts.os_family == 'Suse'

So then cinc-auditor thinks its suse.

@rndmh3ro rndmh3ro merged commit be67e73 into master Oct 5, 2020
@rndmh3ro rndmh3ro deleted the suse_shadow branch October 14, 2020 20:03
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants