{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/18843","labels_url":"https://api.github.com/repos/saltstack/salt/issues/18843/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/18843/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/18843/events","html_url":"https://github.com/saltstack/salt/issues/18843","id":51451794,"number":18843,"title":"State user.present will fail to create home if user exists and homedir doesn't","user":{"login":"calvinhp","id":157091,"avatar_url":"https://avatars.githubusercontent.com/u/157091?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinhp","html_url":"https://github.com/calvinhp","followers_url":"https://api.github.com/users/calvinhp/followers","following_url":"https://api.github.com/users/calvinhp/following{/other_user}","gists_url":"https://api.github.com/users/calvinhp/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinhp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinhp/subscriptions","organizations_url":"https://api.github.com/users/calvinhp/orgs","repos_url":"https://api.github.com/users/calvinhp/repos","events_url":"https://api.github.com/users/calvinhp/events{/privacy}","received_events_url":"https://api.github.com/users/calvinhp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P1","name":"P1","color":"2181ee"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/State%20Module","name":"State Module","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2499,"closed_issues":2529,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-08-29T21:34:19Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2014-12-09T16:53:46Z","updated_at":"2015-08-30T04:09:43Z","closed_at":null,"body":"Ran into this today, it appears that in one of our installs, the user got created at some point, but their home dir didn't. When I ran the highstate today, it errored out with the following:\r\nlocal:\r\n\r\n    ID: xxxxxxx\r\n    Function: user.present\r\n    Result: False\r\n    Comment: These values could not be changed: {'homeDoesNotExist': '/home/xxxxxxx'}\r\n    Started: 11:30:43.057275\r\n    Duration: 6.189 ms\r\n    Changes:\r\n\r\nIt looks like here the change doesn't get made, but reports it back as a change that is remaining.\r\n\r\nhttps://github.com/saltstack/salt/blob/2014.7/salt/states/user.py#L110\r\n\r\nShould the user.add module be called to create the home dir or should user.chhome be modified to create a homedir if one doesn't exist."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/136083664","html_url":"https://github.com/saltstack/salt/issues/18843#issuecomment-136083664","issue_url":"https://api.github.com/repos/saltstack/salt/issues/18843","id":136083664,"user":{"login":"trananhkma","id":8153256,"avatar_url":"https://avatars.githubusercontent.com/u/8153256?v=3","gravatar_id":"","url":"https://api.github.com/users/trananhkma","html_url":"https://github.com/trananhkma","followers_url":"https://api.github.com/users/trananhkma/followers","following_url":"https://api.github.com/users/trananhkma/following{/other_user}","gists_url":"https://api.github.com/users/trananhkma/gists{/gist_id}","starred_url":"https://api.github.com/users/trananhkma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trananhkma/subscriptions","organizations_url":"https://api.github.com/users/trananhkma/orgs","repos_url":"https://api.github.com/users/trananhkma/repos","events_url":"https://api.github.com/users/trananhkma/events{/privacy}","received_events_url":"https://api.github.com/users/trananhkma/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T04:09:43Z","updated_at":"2015-08-30T04:09:43Z","body":"I cannot reproduce this, how did you guys got this problem ?\r\n\r\n````\r\nroot@trananhkma:/srv/salt# grep foo /etc/passwd\r\nfoo:x:1001:1001::/tmp/foo2:\r\nroot@trananhkma:/srv/salt# ls -l /tmp/foo2/\r\ntotal 0\r\n\r\nroot@trananhkma:/srv/salt# ls -l /tmp/foo3\r\nls: cannot access /tmp/foo3: No such file or directory\r\n\r\nroot@trananhkma:/srv/salt# cat buguser.sls \r\nfoo:\r\n  user:\r\n    - present\r\n    - home: /tmp/foo3\r\n\r\n\r\nlocal:\r\n----------\r\n          ID: foo\r\n    Function: user.present\r\n      Result: True\r\n     Comment: Updated user foo\r\n     Started: 11:07:34.981777\r\n    Duration: 45.541 ms\r\n     Changes:   \r\n              ----------\r\n              home:\r\n                  /tmp/foo3\r\n\r\non version\r\n\r\nroot@trananhkma:/srv/salt# salt-call --versions-report\r\n                  Salt: 2015.5.3\r\n                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n                Jinja2: 2.8\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.3.0\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.10\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.0.1\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.4\r\n                  Mako: 1.0.1\r\n               Tornado: Not Installed\r\n Debian source package: 2015.5.3+ds-1trusty1\r\n\r\n````"}}