{"id":2460,"date":"2011-07-25T12:36:01","date_gmt":"2011-07-25T04:36:01","guid":{"rendered":"http:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/?p=2460"},"modified":"2011-07-27T15:50:15","modified_gmt":"2011-07-27T07:50:15","slug":"joining-samba-3-to-active-directory-as-member-using-ads-security-mode","status":"publish","type":"post","link":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/?p=2460","title":{"rendered":"Joining Samba 3 to Active directory as member using ADS security mode"},"content":{"rendered":"<p>1. The key config of smb.conf :<\/p>\n<p>client use spnego = yes<br \/>\nclient signing = yes<br \/>\nrealm = YOUR.ADS.DOMAIN<br \/>\nsecurity = ADS<\/p>\n<pre>;only used if the ads user will login the samba member\r\n;winbind uid = 10000-20000\r\n;winbind gid = 10000-20000\r\n;winbind enum groups = yes\r\n;winbind enum users = yes<\/pre>\n<p>2. The \/etc\/krb5.conf<\/p>\n<p>[libdefaults]<br \/>\ndefault_realm = IEPCLAN.IE.CUHK.EDU.HK<br \/>\ndns_lookup_realm = false<br \/>\ndns_lookup_kdc = false<br \/>\nticket_lifetime = 24h<br \/>\nforwardable = yes<\/p>\n<p>[realms]<br \/>\nYOUR.ADS.DOMAIN = {<br \/>\nkdc = ip.of.your.dc<br \/>\ndefault_domain = your.ads.domain<br \/>\n}<\/p>\n<p>[domain_realm]<br \/>\n.your.ads.domain = YOUR.ADS.DOMAIN<br \/>\nyour.ads.domain = YOUR.ADS.DOMAIN<\/p>\n<p>3. kinit administrator (enter the administrator password when prompted). The klist command should then list a ticket.<\/p>\n<p>4. edit \/etc\/hosts file, add your host ip and your.ads.domain if you got the below error :<\/p>\n<p>Using short domain name &#8212; YOURADDOMAIN<br \/>\nFailed to set servicePrincipalNames. Please ensure that<br \/>\nthe DNS domain of this server matches the AD domain,<br \/>\nOr rejoin with using Domain Admin credentials.<br \/>\nDeleted account for &#8216;HOSTNAME&#8217; in realm &#8216;YOUR.AD.DOMAIN&#8217;<br \/>\nFailed to join domain: Type or value exists<\/p>\n<p>5. net ads join -U Administrator<\/p>\n<p>6. store your winbind credentials with : net setauthuser -U winbind (enter winbind password in AD)<\/p>\n<p>7. restart samba and winbindd<\/p>\n<p>8. use wbinfo -u to check the winbindd works or not<\/p>\n<p>References :<\/p>\n<p><a href=\"http:\/\/www.section6.net\/wiki\/index.php\/Configuring_Samba3_to_be_a_Windows_Domain_Member\">http:\/\/www.section6.net\/wiki\/index.php\/Configuring_Samba3_to_be_a_Windows_Domain_Member<\/a><\/p>\n<p><a href=\"http:\/\/www.samba.org\/samba\/docs\/man\/Samba-HOWTO-Collection\/ServerType.html#id2560123\">http:\/\/www.samba.org\/samba\/docs\/man\/Samba-HOWTO-Collection\/ServerType.html#id2560123<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. The key config of smb.conf :<\/p>\n<p>client use spnego = yes client signing = yes realm = YOUR.ADS.DOMAIN security = ADS<\/p>\n<p> ;only used if the ads user will login the samba member ;winbind uid = 10000-20000 ;winbind gid = 10000-20000 ;winbind enum groups = yes ;winbind enum users = yes <\/p>\n<p>2. The \/etc\/krb5.conf<\/p>\n<p>[libdefaults] [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[3],"tags":[88],"class_list":["post-2460","post","type-post","status-publish","format-standard","hentry","category-computer","tag-samba","odd"],"_links":{"self":[{"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2460"}],"version-history":[{"count":8,"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2460\/revisions"}],"predecessor-version":[{"id":2476,"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2460\/revisions\/2476"}],"wp:attachment":[{"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staff.ie.cuhk.edu.hk\/~sfluk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}