{"id":1061,"date":"2023-06-20T14:45:13","date_gmt":"2023-06-20T06:45:13","guid":{"rendered":"http:\/\/www.rchen.top\/?p=1061"},"modified":"2023-07-04T16:16:47","modified_gmt":"2023-07-04T08:16:47","slug":"openldap-client%e8%87%aa%e5%8a%a8%e5%88%9b%e5%bb%ba%e8%b4%a6%e6%88%b7home%e7%9b%ae%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.rchen.top\/?p=1061","title":{"rendered":"openldap-client\u81ea\u52a8\u521b\u5efa\u8d26\u6237home\u76ee\u5f55"},"content":{"rendered":"<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">\u8981\u5728\u7528\u6237\u7b2c\u4e00\u6b21\u767b\u5f55\u65f6\u4e3a\u5176\u542f\u7528\u81ea\u52a8\u521b\u5efa`home\u76ee\u5f55`\uff0c\u9700\u8981\u5b89\u88c5`oddjob-mkhomedir`\uff0c\u5b83\u63d0\u4f9b`pam_oddjob_mkhomedir`\u6a21\u5757\uff0c\u4ee5\u4fbf\u5728\u7528\u6237\u767b\u5f55\u65f6\u4e3a\u5176\u521b\u5efa\u5bb6\u76ee\u5f55\u3002<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">1\u3001\/\/\u5b89\u88c5 oddjob-mkhomedir<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">yum -y install nss-pam-ldapd pam_ldap openssh-ldap oddjob oddjob-mkhomedir openldap-clients<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">$ dnf install oddjob-mkhomedir<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">$ systemctl enable &#8211;now oddjobd<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">2\u3001\/\/\u52a0\u8f7d pam_oddjob_mkhomedir \u6a21\u5757<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">$ echo &#8220;session optional pam_oddjob_mkhomedir.so skel=\/etc\/skel\/ umask=0022&#8221; &gt;&gt; \/etc\/pam.d\/system-auth<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">\u6267\u884c<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">#authselect select sssd with-mkhomedir &#8211;force<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">\u6216\u8005<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">#authconfig \\&#8211;disablesssd \\&#8211;enableldap \\&#8211;enableldapauth \\&#8211;ldapserver=${ldapuri} \\&#8211;ldapbasedn=${ldapbase} \\&#8211;enablerfc2307bis \\&#8211;enablemkhomedir \\&#8211;updateall<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">3\u3001<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">systemctl enable oddjobd.service<\/span><\/p>\n<p style=\"margin-top: 0pt; margin-bottom: 15pt; font-family: 'Microsoft Yahei'; font-size: 12.0pt; color: #555555;\"><span style=\"background: #FCFBF7;\">systemctl restart oddjobd.service<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u5728\u7528\u6237\u7b2c\u4e00\u6b21\u767b\u5f55\u65f6\u4e3a\u5176\u542f\u7528\u81ea\u52a8\u521b\u5efa`home\u76ee\u5f55`\uff0c\u9700\u8981\u5b89\u88c5`oddjob-mkhomedir`\uff0c\u5b83\u63d0\u4f9b`p [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":490,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[14],"class_list":["post-1061","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/1061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1061"}],"version-history":[{"count":2,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/1061\/revisions"}],"predecessor-version":[{"id":1075,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/1061\/revisions\/1075"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/media\/490"}],"wp:attachment":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}