Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

user_shadow (6) Versions 0.1.5

Provides a resource to modify shadow attributes for a user

Policyfile
Berkshelf
Knife
cookbook 'user_shadow', '~> 0.1.5', :supermarket
cookbook 'user_shadow', '~> 0.1.5'
knife supermarket install user_shadow
knife supermarket download user_shadow
README
Dependencies
Changelog
Quality 33%

Circle CI

user_shadow

A library cookbook to provide a resource for modifying user shadow attributes.

Supported Platforms

  • Centos 6.7
  • Ubuntu 12.04
  • Ubuntu 14.04

Requirements

The library depends on the chage binary being installed on the targe system. The chage binary is part of the shadow-utils package on RHEL/CentOS and part of the passwd package on Ubuntu (these packages are usually installed by default).

Usage

Place a dependency on the user_shadow cookbook in your cookbook's metadata.rb

depends 'user_shadow'

Then, in your recipe

# myrecipe.rb
user_shadow 'testuser'
  sp_lstchg '2015-07-01'
  sp_expire '2030-08-30'
  sp_min 20
  sp_max 60
  sp_inact 10
  sp_warn 10
end

The user to modify is testuser. See a full list of parameters and explanation below.

Resource overview

The user_shadow resource modifies the shadow attributes of a user. There is only one action defined, :set which writes the new values on the corresponding attributes.

Parameters

  • user - String that denotes the user to be modified. Defaults to the name of the resource.
  • sp_lstchg - String that denotes the date when the user's password was last changed. Must be in YYYY-MM-DD format. No default.
  • sp_expire - String that denotes the date when the account expires. Must be in YYYY-MM-DD format. No default.
  • sp_min - Number that denotes the minimum number of days between password changes. No default.
  • sp_max - Number that denotes the maximum number of days between password changes. No default.
  • sp_inact - Number that denotes the days after password expire until account is disabled. No default.
  • sp_warn - Number that denotes the number of days to warn before password expires. No default.
  • chage - Path to the chage binary. Defaults to /usr/bin/chage

Actions

  • :set - Modifies the corresponding attributes. Default action. If there are no parameters set the resource doesn't do anything.

Out of scope

This library cookbook doesn't deal (now or in the future) with managing the encrypted password for the user in /etc/shadow. This can be managed through the built-in Chef user resource.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-my-feature)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Author:: Kostas Georgakopoulos (kostas.georgakopoulos@rackspace.co.uk)

user_shadow CHANGELOG

0.1.5

  • Fixed Rubocop errors
  • Fixed circleci ssh key issue
  • Added Gemfile.lock to repo
  • Changed CentOS 6.6 to 6.7 in unit tests

0.1.4

  • CentOS support on 6.7 instead of 6.6

0.1.3

  • Fix for Rubocop tests

0.1.2

  • Updated README

0.1.1

  • Corrected the cookbook description

0.1.0

  • Converted the resource to HWRP

0.0.1

  • First version

Collaborator Number Metric
            

0.1.5 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.5 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.5 passed this metric

No Binaries Metric
            

0.1.5 passed this metric

Testing File Metric
            

0.1.5 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.5 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number