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

Disable System Accounts. Fix #6 #25

Merged
merged 2 commits into from
Jun 19, 2015
Merged

Disable System Accounts. Fix #6 #25

merged 2 commits into from
Jun 19, 2015

Conversation

rndmh3ro
Copy link
Member

This PR disables sets the login-shell of system-accounts to nologin aswell as it removes the password.

@rndmh3ro rndmh3ro changed the title System accs Disable System Accounts. Fix #6 Jun 18, 2015
when: not uid_min

- name: get all system accounts
command: awk -F'':'' '{ if ( $3 <= {{uid_max|quote}} ) print $1}' /etc/passwd removes=/etc/passwd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be bad if this command removes /etc/passwd :)

@rndmh3ro
Copy link
Member Author

removes does not do what you think it does. See here:
a filename, when it does not exist, this step will not be run.

This means, if the file is not present, the task will not be run. Similary the creates-option. If the file exists, this step will not be run (the opposite).

@chris-rock
Copy link
Member

@rndmh3ro as always great work

chris-rock added a commit that referenced this pull request Jun 19, 2015
@chris-rock chris-rock merged commit 2fa4e7d into master Jun 19, 2015
@chris-rock chris-rock deleted the system_accs branch June 19, 2015 09:45
rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
Make it configurable to only harden ssh client/server or both (default).
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
Make it configurable to only harden ssh client/server or both (default).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants