# Troubles with data bags in chef/knife

**URL:** <https://discourse.chef.io/t/troubles-with-data-bags-in-chef-knife/4700>\
**Category:** Chef Infra (archive)\
**Created:** [November 18, 2013, 11:25am UTC](https://discourse.chef.io/t/troubles-with-data-bags-in-chef-knife/4700 "2013-11-18T11:25:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheFatal](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@TheFatal](https://discourse.chef.io/u/TheFatal)\
**Post date:** [November 18, 2013, 11:25am UTC](https://discourse.chef.io/t/troubles-with-data-bags-in-chef-knife/4700/1 "2013-11-18T11:25:13Z")

</div>

i try to create users on remote system by chef/knife, but something goes  
wrong… here is my steps:

```
installing "user" cookbook

knife cookbook site install user

creating data bag for it

knife data bag create users

creating a json file with options

cat data_bags/users/fatal.json
{
"id": "fatal",
"uid": "1002",
"home": "/home/fatal",
"groups": "sudo",
"shell": "/bin/bash",
"password": "$6$wkWXnXUk$xjaISNyG3cDGU2XYBAf."
}

exporting it in my data bag

knife data bag from file users data_bags/users/fatal.json

adding recipe "user" to my remote node

knife node chef-test-client show
Node Name: chef-test-client
Environment: _default
FQDN: chef-test-client
IP: 192.168.16.777
Run List: recipe[group], recipe[user]
Roles:
Recipes: group, user
Platform: debian 7.1
Tags:

uploading it on knife server

knife cookbook upload user

synchronizing on my remote node

chef-client
Starting Chef Client, version 11.8.0
resolving cookbooks for run list: ["group::data_bag", "user::data_bag"]
Synchronizing Cookbooks:
- user
- group
Compiling Cookbooks...
Converging 0 resources
Chef Client finished, 0 resources updated

```

so nothing happens, user is not created; what am i doing wrong ?, guys please  
help me to deal with it

---

<div class="post-metadata">

**Author:** ![Guy\_Matz](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Guy\_Matz](https://discourse.chef.io/u/Guy_Matz)\
**Post date:** [November 18, 2013, 2:27pm UTC](https://discourse.chef.io/t/troubles-with-data-bags-in-chef-knife/4700/2 "2013-11-18T14:27:54Z")

</div>

Newb here, but I think you need the recipe users::fatal . . .

On Mon, Nov 18, 2013 at 6:25 AM, TheFatal [fatal@troitsk.ws](mailto:fatal@troitsk.ws) wrote:

> i try to create users on remote system by chef/knife, but something goes  
> wrong... here is my steps:
> 
> ```
> installing "user" cookbook
> 
> knife cookbook site install user
> 
> creating data bag for it
> 
> knife data bag create users
> 
> creating a json file with options
> 
> cat data_bags/users/fatal.json
> {
> "id": "fatal",
> "uid": "1002",
> "home": "/home/fatal",
> "groups": "sudo",
> "shell": "/bin/bash",
> "password": "$6$wkWXnXUk$xjaISNyG3cDGU2XYBAf."
> }
> 
> exporting it in my data bag
> 
> knife data bag from file users data_bags/users/fatal.json
> 
> adding recipe "user" to my remote node
> 
> knife node chef-test-client show
> Node Name: chef-test-client
> Environment: _default
> FQDN: chef-test-client
> IP: 192.168.16.777
> Run List: recipe[group], recipe[user]
> Roles:
> Recipes: group, user
> Platform: debian 7.1
> Tags:
> 
> uploading it on knife server
> 
> knife cookbook upload user
> 
> synchronizing on my remote node
> 
> chef-client
> Starting Chef Client, version 11.8.0
> resolving cookbooks for run list: ["group::data_bag", "user::data_bag"]
> Synchronizing Cookbooks:
> - user
> - group
> Compiling Cookbooks...
> Converging 0 resources
> Chef Client finished, 0 resources updated
> 
> ```
> 
> so nothing happens, user is not created; what am i doing wrong ?, guys  
> please  
> help me to deal with it
