# User :create do not update already existing user

**URL:** <https://discourse.chef.io/t/user-create-do-not-update-already-existing-user/9545>\
**Category:** Chef Infra (archive)\
**Created:** [September 29, 2016, 10:04am UTC](https://discourse.chef.io/t/user-create-do-not-update-already-existing-user/9545 "2016-09-29T10:04:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauog](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mauog](https://discourse.chef.io/u/mauog)\
**Post date:** [September 29, 2016, 10:04am UTC](https://discourse.chef.io/t/user-create-do-not-update-already-existing-user/9545/1 "2016-09-29T10:04:09Z")

</div>

Reading the chef documentation at [https://docs.chef.io/resource\_user.html](https://docs.chef.io/resource_user.html) i see written in the “:create” action description that “If a user already exists (but does not match), update that user to match”.

So I expect that if I have an already existing user “johndoe” with the “/bin/bash” shell and I :create an user named “johndoe” with the “/bin/false” shell chef will update that user changing the shell to “/bin/false” but this does not happen.

Is there something wrong in my expectation?

Thank You

Regards

M.

---

<div class="post-metadata">

**Author:** ![mauog](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mauog](https://discourse.chef.io/u/mauog)\
**Post date:** [September 29, 2016, 12:18pm UTC](https://discourse.chef.io/t/user-create-do-not-update-already-existing-user/9545/2 "2016-09-29T12:18:25Z")

</div>

I am so sorry  
I understood what was wrong  
That’s my fault

I relaized what happened.

I put a condition like  
if !node[‘etc’][‘passwd’][users[‘username’]]  
which look for the user in /etc/passwd and in this case skips the user :create action

Sorry again guys
