{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/29633","labels_url":"https://api.github.com/repos/saltstack/salt/issues/29633/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/29633/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/29633/events","html_url":"https://github.com/saltstack/salt/issues/29633","id":121778927,"number":29633,"title":"user.present does not modify home directory","user":{"login":"twellspring","id":9868888,"avatar_url":"https://avatars.githubusercontent.com/u/9868888?v=3","gravatar_id":"","url":"https://api.github.com/users/twellspring","html_url":"https://github.com/twellspring","followers_url":"https://api.github.com/users/twellspring/followers","following_url":"https://api.github.com/users/twellspring/following{/other_user}","gists_url":"https://api.github.com/users/twellspring/gists{/gist_id}","starred_url":"https://api.github.com/users/twellspring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twellspring/subscriptions","organizations_url":"https://api.github.com/users/twellspring/orgs","repos_url":"https://api.github.com/users/twellspring/repos","events_url":"https://api.github.com/users/twellspring/events{/privacy}","received_events_url":"https://api.github.com/users/twellspring/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":346,"closed_issues":700,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2015-12-15T17:44:23Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-12-11T19:43:22Z","updated_at":"2015-12-15T18:18:08Z","closed_at":null,"body":"user.present will not modify the home directory in /etc/passwd unless createhome is set to true.   modification of the home directory should not be dependent on createhome being True.\r\n\r\nAppears to be similar to closed case  #15649\r\n\r\n**test.sls**\r\n```\r\ntestuser_create:\r\n  user.present:\r\n    - name: testuser\r\n    - home: /home/testuser\r\n    - createhome: True\r\n\r\ntestuser_change_homedir_createTrue:\r\n  user.present:\r\n    - name: testuser\r\n    - home: /home/testuser2\r\n    - createhome: True\r\n\r\ntestuser_change_homedir_createFalse:\r\n  user.present:\r\n    - name: testuser\r\n    - home: /home/testuser3\r\n    - createhome: False\r\n\r\ntestuser_show_etc_passwd:\r\n  cmd.run:\r\n    - name: grep testuser /etc/passwd\r\n```\r\n\r\n**State run**\r\n```\r\n----------\r\n          ID: testuser_create\r\n    Function: user.present\r\n        Name: testuser\r\n      Result: True\r\n     Comment: Updated user testuser\r\n     Started: 19:39:22.706569\r\n    Duration: 25.191 ms\r\n     Changes:\r\n              ----------\r\n              home:\r\n                  /home/testuser\r\n----------\r\n          ID: testuser_change_homedir_createTrue\r\n    Function: user.present\r\n        Name: testuser\r\n      Result: True\r\n     Comment: Updated user testuser\r\n     Started: 19:39:22.732123\r\n    Duration: 12.238 ms\r\n     Changes:\r\n              ----------\r\n              home:\r\n                  /home/testuser2\r\n----------\r\n          ID: testuser_change_homedir_createFalse\r\n    Function: user.present\r\n        Name: testuser\r\n      Result: True\r\n     Comment: User testuser is present and up to date\r\n     Started: 19:39:22.744655\r\n    Duration: 1.326 ms\r\n     Changes:\r\n----------\r\n          ID: testuser_show_etc_passwd\r\n    Function: cmd.run\r\n        Name: grep testuser /etc/passwd\r\n      Result: True\r\n     Comment: Command \"grep testuser /etc/passwd\" run\r\n     Started: 19:39:22.746790\r\n    Duration: 4.618 ms\r\n     Changes:\r\n              ----------\r\n              pid:\r\n                  14248\r\n              retcode:\r\n                  0\r\n              stderr:\r\n              stdout:\r\n                  testuser:x:1005:1006::/home/testuser2:\r\n\r\nSummary\r\n------------\r\nSucceeded: 4 (changed=3)\r\nFailed:    0\r\n------------\r\nTotal states run:     4\r\n```\r\n\r\n**versions**\r\n```\r\n# salt --versions-report\r\n           Salt: 2015.5.8\r\n         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n         Jinja2: 2.7.2\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.4.0\r\n           RAET: Not Installed\r\n            ZMQ: 4.0.4\r\n           Mako: 0.9.1\r\n        Tornado: 4.2.1\r\n        timelib: Not Installed\r\n       dateutil: 2.4.2\r\n# salt test-server-234 cmd.run \"salt-minion --version\"\r\ntest-server-234:\r\n    salt-minion 2015.5.8 (Lithium)\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/164846456","html_url":"https://github.com/saltstack/salt/issues/29633#issuecomment-164846456","issue_url":"https://api.github.com/repos/saltstack/salt/issues/29633","id":164846456,"user":{"login":"twellspring","id":9868888,"avatar_url":"https://avatars.githubusercontent.com/u/9868888?v=3","gravatar_id":"","url":"https://api.github.com/users/twellspring","html_url":"https://github.com/twellspring","followers_url":"https://api.github.com/users/twellspring/followers","following_url":"https://api.github.com/users/twellspring/following{/other_user}","gists_url":"https://api.github.com/users/twellspring/gists{/gist_id}","starred_url":"https://api.github.com/users/twellspring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twellspring/subscriptions","organizations_url":"https://api.github.com/users/twellspring/orgs","repos_url":"https://api.github.com/users/twellspring/repos","events_url":"https://api.github.com/users/twellspring/events{/privacy}","received_events_url":"https://api.github.com/users/twellspring/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:18:08Z","updated_at":"2015-12-15T18:18:08Z","body":"Yes, I meant /etc/passwd.  I updated my initial comment to fix that. \r\n\r\nThe goal was not to get 3 different users, but to show that changing the home directory of a user works if createhome: True and does not work if createhome: False   \r\n\r\nMy understanding of this state is it will set the home directory to the value passed by home and then optionally create the home directory if createhome is set to True.   The setting of the home directory should not be dependent on having createhome set to True.\r\n\r\n"}}