Create and manage users and groups
{
"id" : "username", "name" : "Real Name", "uid" : 10001, "shell" : "/bin/bash", "password" : "$1$OWxipM7o$9aC2eh/NX0umkmX7Nf2mr1"
}
The “shell” and “password” fields are optional. Shell defaults to /bin/bash, and password defaults to “foo”.
To generate the password, do this:
$ openssl passwd -1
You will be prompted to enter your password (twice!) then a hash will pop out.
{
"id" : "group name", "gid" : 20001, "members" : [ "username", "otheruser" ]
}
All fields are required.
include_recipe "accounts"
… or, individually:
include_recipe "accounts::groups" include_recipe "accounts::users"
Copyright 2010, Estately, Inc.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.