cookbook 'user_shadow', '= 0.1.4', :supermarket
user_shadow (6) Versions 0.1.4 Follow0
Provides a resource to modify shadow attributes for a user
cookbook 'user_shadow', '= 0.1.4'
knife supermarket install user_shadow
knife supermarket download user_shadow
A library cookbook to provide a resource for modifying user shadow attributes.
- Centos 6.7
- Ubuntu 12.04
- Ubuntu 14.04
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).
Place a dependency on the user_shadow cookbook in your cookbook's metadata.rb
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.
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.
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
chagebinary. Defaults to
: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
- Fork the repository on Github
- Create a named feature branch (i.e.
- Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request
License and Authors
Author:: Kostas Georgakopoulos (firstname.lastname@example.org)
This cookbook has no specified dependencies.
- CentOS support on 6.7 instead of 6.6
- Fix for Rubocop tests
- Updated README
- Corrected the cookbook description
- Converted the resource to HWRP
- First version
0.1.4 passed this metric
0.1.4 passed this metric