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

Make useradd defaults in login.defs dependent on OS #266

Merged
merged 5 commits into from
Apr 13, 2020
Merged

Make useradd defaults in login.defs dependent on OS #266

merged 5 commits into from
Apr 13, 2020

Conversation

aisbergg
Copy link
Contributor

@aisbergg aisbergg commented Apr 4, 2020

The main purpose of this PR is to make the useradd defaults MAIL_DIR and CREATE_HOME dependent on the OS (fixes: #265). Other minor changes included in this PR are:

Signed-off-by: Andre Lehmann <aisberg@posteo.de>
All tabs were converted into spaces and all values were properly aligned, making
the file easier to read.

Signed-off-by: Andre Lehmann <aisberg@posteo.de>
Signed-off-by: Andre Lehmann <aisberg@posteo.de>
Signed-off-by: Andre Lehmann <aisberg@posteo.de>
Signed-off-by: Andre Lehmann <aisberg@posteo.de>
@rndmh3ro rndmh3ro merged commit 33ef27d into dev-sec:master Apr 13, 2020
@rndmh3ro
Copy link
Member

Thanks for these numerous improvements! :)

@@ -27,5 +27,8 @@ os_auth_sys_uid_max: 499
os_auth_sys_gid_min: 100
os_auth_sys_gid_max: 499

# defaults for useradd
os_useradd_create_home: false
Copy link
Contributor

Choose a reason for hiding this comment

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

@aisbergg why Suse in particular has this disabled by default?

Copy link
Contributor Author

@aisbergg aisbergg May 16, 2020

Choose a reason for hiding this comment

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

@aisbergg why Suse in particular has this disabled by default?

That I can't say, all I can say is that those are the defaults found in the shadow package.

@aisbergg aisbergg deleted the bug-logindefs-defaults branch May 15, 2020 21:07
rndmh3ro added a commit that referenced this pull request Jul 24, 2020
Do not use bash to get ssh version
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
* Add proper ansible_managed header in each template

Signed-off-by: Andre Lehmann <aisberg@posteo.de>

* Use consistent indentation

All tabs were converted into spaces and all values were properly aligned, making
the file easier to read.

Signed-off-by: Andre Lehmann <aisberg@posteo.de>

* Make useradd defaults inside login.defs dependent on OS family

Signed-off-by: Andre Lehmann <aisberg@posteo.de>

* Remove duplicate key

Signed-off-by: Andre Lehmann <aisberg@posteo.de>

* Replace tab with space

Signed-off-by: Andre Lehmann <aisberg@posteo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/etc/login.defs alters centos 7/8 default values
3 participants