cookbook 'user_account', '= 1.1.0'
user_account (3) Versions 1.1.0 Follow7
Provides a resource for user_account
cookbook 'user_account', '= 1.1.0', :supermarket
knife supermarket install user_account
knife supermarket download user_account
User_account Cookbook
Provides a lwrp to manage user accounts on systems.
Attributes
user::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['user_account']['home_root']</tt></td>
<td>String</td>
<td>default root home path</td>
<td><tt>/home</tt></td>
</tr>
<tr>
<td><tt>['user_account']['default_shell']</tt></td>
<td>String</td>
<td>default shell to use per platform</td>
<td><tt>/bin/bash</tt></td>
</tr>
</table>
Resource/Provider
user_account
Note: If you do not set the ssh_keys attribute then this resource
will ignore the authorized_keys file and you can manage it in
another way.
Actions
- create - creates a user
- delete - deletes a user
Attributes
- username - name of user account
- password - user password
- default_group - name of an existing default group to place user in (instead of creating a group same as username)
- groups - array of groups to add to the user
- home - override home dir if desired
- manage_home - whether to create the home dir
- ssh_keys - array of ssh keys
- uid - specify uid
- shell - shell to use
- include_nodes - only add user to list of nodes
- exclude_nodes - don't add user to list of nodes
user_account 'jim' do action :create uid 1026 groups %w(wheel) ssh_keys 'not a real ssh key' end user_account 'richard' do action :create groups %w(devs wheel) password 'richardspass' end
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License and Authors
- Author:: Jim Rosser(jarosser06@gmail.com)
copyright (C) 2014-2015 Texas A&M Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
user_account CHANGELOG
1.1.0
- [jarosser06] - Home attr no longer has /home prepended to it
1.0.0
- [jarosser06] - Renamed cookbook to user_account
0.3.1
- [vblessing] - fixed test for not deleting home dir on remove action
0.3.0
- [vblessing] - added home directory deletion to remove action
0.2.1
- [ecwws] - update permissions to support new gid options
0.2.0
- [ecwws] - added support for setting user primary group
0.1.1
- [jarosser06] - removed unsused code
- [jarosser06] - cleaned up rubocop and foodcritic warnings
- [jarosser06] - using execute instead of mixlib shellout for omni group adds
0.1.0
- [jarosser06] - Initial release of user
Foodcritic Metric
1.1.0 failed this metric
FC021: Resource condition in provider may not behave as expected: /tmp/cook/4018d124b79fd0ec2906931d/user_account/providers/default.rb:3
FC031: Cookbook without metadata file: /tmp/cook/4018d124b79fd0ec2906931d/user_account/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/4018d124b79fd0ec2906931d/user_account/metadata.rb:1
1.1.0 failed this metric
FC031: Cookbook without metadata file: /tmp/cook/4018d124b79fd0ec2906931d/user_account/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/4018d124b79fd0ec2906931d/user_account/metadata.rb:1