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

simple_users (8) Versions 0.1.7

Manages Linux (Ubuntu/CentOS) local users

Policyfile
Berkshelf
Knife
cookbook 'simple_users', '~> 0.1.7', :supermarket
cookbook 'simple_users', '~> 0.1.7'
knife supermarket install simple_users
knife supermarket download simple_users
README
Dependencies
Quality 17%

Simple_Users cookbook

Scope:

Chef cookbook to manage users.

Supported Platforms:

  • Ubuntu 16.04 (tested with Kitchen)
  • Ubuntu 14.04 was not tested however no ubuntu 16.04-specific commands are used here so it will probably work.
  • CentOS 7 (tested with Kitchen)
  • Redhat 7 (tested with Kitchen)

USAGE:

  • Set 'simple_users' as one of your dependencies
  • Include simple_users::default in any of your recipes, roles or environments.

Add Users:

Add a block to the default attribute containing each of the following to create a user:
- name - Username.
- fullName - Full name of your new user (may contain spaces).
- passHash - Shadow-file hash of the desired password. The hash can be generated with the following commands:

openssl passwd -1 -salt xyz  yourpass
makepasswd --clearfrom=- --crypt-md5 <<< YourPass
  • sshPubKey - ssh public key string to add to ~/.ssh/authorized_keys
  • action - create
  • sudo - yes/no. Adding/removing the user from the sudoers file.

Example of the default attribute file:

default['simple_users']['users'] = [
    {
        'name' => 'usernam01',
        'fullName' => 'User01 Name',
        'passHash' => 'A_Long_HASH_String...',
        'sshPubKey' => 'ssh-rsa YourSSHPublicKey...',
        'myAction' => 'create',
        'sudo' => 'yes'
    },
    {
        'name' => 'usernam02',
        'fullName' => 'User02 Name',
        'passHash' => 'A_Long_HASH_String...',
        'sshPubKey' => 'ssh-rsa YourSSHPublicKey...',
        'myAction' => 'create',
        'sudo' => 'no'
    }
]

Remove Users:

Add all the entries as mentioned above but put "remove" as the value of myAction.
ruby
{
'name' => 'usernam03',
'fullName' => 'User03 Name',
'passHash' => 'A_Long_HASH_String...',
'sshPubKey' => 'ssh-rsa YourSSHPublicKey...',
'myAction' => 'remove'
}

Removing Users from Sudoers

Put 'no' in the 'sudo' section of your user.

Note that the above must be a part of the same default['simple_users']['users'] array.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.7 failed this metric

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

Contributing File Metric
            

0.1.7 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.7 failed this metric

FC066: Ensure chef_version is set in metadata: simple_users/metadata.rb:1
FC069: Ensure standardized license defined in metadata: simple_users/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.1.7 passed this metric

Testing File Metric
            

0.1.7 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.7 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