Manages /etc/login.defs
on Linux systems.
Manages the contents, owner, group, and mode of /etc/login.defs
A regular include
will use default configuration:
include login_defs
See Example Usage below for more ways to use this module.
- Requires Puppet 4.x
- Requires puppetlabs/stdlib module.
Specifies the file mode for /etc/login.defs
. Defaults to 0644
.
Specifies the file owner for /etc/login.defs
. Defaults to root
.
Specifies the file group for /etc/login.defs
. Defaults to 0
.
A hash of options to populate the login.defs
file with.
Reference the login.defs(5)
man page for a list of configuration items and
their description. http://linux.die.net/man/5/login.defs
-
Any option you add here will be merged with the default options.
-
You can override a default value here as well by using a key with the same name.
-
You can remove a default option by specifying
undef
or an empty string for its value. -
Your options will not be validated for correctness.
To customize, set the login_defs::options
parameter with values that will
override and be merged with the defaults.
Specifying options in a class declaration:
class { 'login_defs':
options => {
'UMASK' => '022'
}
}
In Hiera data:
login_defs::options:
UMASK: '022'
Remove the default ENCRYPT_METHOD
entirely:
class { '::login_defs':
options => {
'ENCRYPT_METHOD' => undef,
},
}
-
Fork and clone the repository.
-
Branch off of
master
. -
Open a merge request into
master
and check the validation results (GitHub Actions).
To add a distribution's default options:
-
Create a file under
data/
named as:- "%{facts.os.family}-%{facts.os.release.major}.yaml" - "%{facts.os.family}.yaml" - "%{facts.os.name}.yaml"
Be specific if the options are unique to a particular release. Refer to the RedHat defaults for an example of setting common defaults in
RedHat.yaml
and overriding or adding parameters inRedHat-*.yml
. -
Refer to the existing configs for an example of the structure.
-
Set all of the default options for the distribution from
/etc/login.defs
without any customizations. -
Define a test (optional)
Add the test to the
spec/matrix.yaml
file, specifying the value of the options to check. This may be duplicated from the Hiera data, but it's flat.A test isn't required for contributions, but it's helpful. If one isn't provided in a contribution, it will be added by the maintainer.
Maintained by Josh Beard
See the list of contributors.