{"id":1690,"date":"2017-01-12T18:29:30","date_gmt":"2017-01-12T23:29:30","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=1690"},"modified":"2017-01-12T18:29:30","modified_gmt":"2017-01-12T23:29:30","slug":"freeipa-could-not-chdir-to-home-directory-homebbilliards-no-such-file-or-directory","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2017\/01\/freeipa-could-not-chdir-to-home-directory-homebbilliards-no-such-file-or-directory\/","title":{"rendered":"FreeIPA: Could not chdir to home directory \/home\/bbilliards: no such file or directory"},"content":{"rendered":"<p>I recently installed a <a href=\"http:\/\/www.freeipa.org\/\">FreeIPA<\/a> server and a FreeIPA client. I generated a Kerberos ticket for a test user, Bob Billiards, on the IPA server:<\/p>\n<p><code># kinit bbilliards<br \/>\nPassword for bbilliards@IPA.OSRIC.NET:<\/code><\/p>\n<p>Then I attempted to ssh into the IPA client as that user. The connection was successful, but it could not find the user&#8217;s home directory:<\/p>\n<p><code># ssh bbilliards@ariel.osric.net<br \/>\nbbilliards@ariel.osric.net's password:<br \/>\nCould not chdir to home directory \/home\/bbilliards: no such file or directory<\/code><\/p>\n<p>The location of the home directory was set when I created the user, as can be seen here:<\/p>\n<pre><code># ipa user-find bbilliards\r\n--------------\r\n1 user matched\r\n--------------\r\n  User login: bbilliards\r\n  First name: Bob\r\n  Last name: Billiards\r\n  Home directory: \/home\/bbilliards\r\n  Login shell: \/bin\/sh\r\n  Principal name: bbilliards@IPA.OSRIC.NET\r\n  Principal alias: bbilliards@IPA.OSRIC.NET\r\n  Email address: bbilliards@ipa.osric.net\r\n  UID: 1110200001\r\n  GID: 1110200001\r\n  SSH public key fingerprint: [redacted]\r\n  Account disabled: False\r\n----------------------------\r\nNumber of entries returned 1\r\n----------------------------<\/code><\/pre>\n<p>Shouldn&#8217;t the system be able to create the home directory automatically? It turns out it can, if you specify the <code>--mkhomedir<\/code> switch when installing the IPA client:<\/p>\n<p><code># ipa-client-install --mkhomedir<\/code><\/p>\n<p>Now when I ssh into the machine it creates a home directory:<\/p>\n<p><code># ssh bbilliards@ariel.osric.net<br \/>\nCreating home directory for bbilliards<br \/>\n-sh-4.2$ pwd<br \/>\n\/home\/bbilliards<\/code><\/p>\n<p>You may prefer to mount a Network File System (NFS) directory as a home directory instead so that users have the same home directories across machines.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When logging into an IPA client machine via ssh, I received a message &#8220;Could not chdir to home directory \/home\/bbilliards: no such file or directory&#8221;. Including the &#8211;mkhomedir option when running ipa-client-install will address this, enabling IPA to create the user&#8217;s home directory on the target machine on login.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[422],"tags":[417],"class_list":["post-1690","post","type-post","status-publish","format-standard","hentry","category-sysadmin","tag-freeipa"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=1690"}],"version-history":[{"count":4,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1690\/revisions"}],"predecessor-version":[{"id":1694,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1690\/revisions\/1694"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=1690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=1690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=1690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}