Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gibbs/puppet-login_defs
Puppet module for managing /etc/login.defs
https://github.com/gibbs/puppet-login_defs
login puppet puppet-module
Last synced: about 1 month ago
JSON representation
Puppet module for managing /etc/login.defs
- Host: GitHub
- URL: https://github.com/gibbs/puppet-login_defs
- Owner: gibbs
- License: apache-2.0
- Created: 2022-03-01T19:15:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-21T00:31:36.000Z (10 months ago)
- Last Synced: 2024-09-30T05:40:49.358Z (about 2 months ago)
- Topics: login, puppet, puppet-module
- Language: Ruby
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# login_defs
[![Build Status](https://github.com/gibbs/puppet-login_defs/workflows/CI/badge.svg)](https://github.com/gibbs/puppet-login_defs/actions?query=workflow%3ACI)
[![Release](https://github.com/gibbs/puppet-login_defs/workflows/Release/badge.svg)](https://github.com/gibbs/puppet-login_defs/actions?query=workflow%3ARelease)
[![Puppet Forge](https://img.shields.io/puppetforge/v/genv/login_defs.svg?maxAge=2592000?style=plastic)](https://forge.puppet.com/genv/login_defs)
[![Apache-2 License](https://img.shields.io/github/license/gibbs/puppet-login_defs.svg)](LICENSE)Configure and manage the `/etc/login.defs` file that defines site-specific
configuration for the shadow password suite.## Usage
Including `login_defs` will manage `/etc/login.defs` with the default
configuration supplied by supported distributions:```puppet
include login_defs
```To manage the file permissions:
```puppet
class { 'login_defs':
owner => 0,
group => 0,
mode => '0644',
}
```### Configuration Examples
The `options` parameter accepts a hash of `value`, `comment` and `enabled`.
- When `enabled` is false the setting will be commented out.
- The `comment` parameter is used to maintain comments in the file.#### Manifest Example
```puppet
# Manifest example
class { 'login_defs':
mode => '0644',
options => {
'PASS_MAX_DAYS' => {
value => 30,
comment => 'Maximum number of days a password may be used.',
},
'DEFAULT_HOME' => {
value => 'yes',
enabled => false,
}
}
}
```#### Hiera Example
```yaml
login_defs::mode: '0644'
login_defs::options:
PASS_MAX_DAYS:
value: 30
comment: Maximum number of days a password may be used.DEFAULT_HOME:
value: 'yes'
enabled: falseTTYGROUP:
value: tty
comment: |-
If you have a "write" program which is "setgid" to a special group
which owns the terminals, define TTYGROUP to the group number and
TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
TTYPERM to either 622 or 600.
TTYPERM:
value: '0600'
```### Managing the Package
This module will not, by default, manage the `login` (Debian) or
`shadow-utils` (RedHat) package. This can be enabled and customised with:```puppet
class { 'login_defs':
package_manage => true,
package_ensure => 'installed',
package_name => undef,
}
```