{"id":864,"date":"2018-04-23T23:26:57","date_gmt":"2018-04-23T16:26:57","guid":{"rendered":"https:\/\/trichev.com\/blog\/?p=864"},"modified":"2018-04-23T23:34:54","modified_gmt":"2018-04-23T16:34:54","slug":"samba-3-as-a-domain-member-centos-6pbis","status":"publish","type":"post","link":"https:\/\/trichev.com\/blog\/2018\/04\/23\/samba-3-as-a-domain-member-centos-6pbis\/","title":{"rendered":"Samba 3 as a Domain Member (CentOS 6+PBIS)"},"content":{"rendered":"<h3>Requirements<\/h3>\n<p>Supported Samba versions:<br \/>\n\u2013 Samba version 3.0.25 or later versions in the 3.0 series<br \/>\n\u2013 Samba 3.2.X<br \/>\n\u2013 Samba 3.4.X<br \/>\n\u2013 Samba 3.5.X<\/p>\n<p>Winbind must be installed and running when you are using Samba version 3.0.25 or later versions in the 3.0 series.<br \/>\nIf you are using Samba version 3.2.X or 3.5.X, Winbind is not required.<\/p>\n<p>Samba package must support ADS security.<br \/>\nPowerBroker Identity Services relies on ADS security in a Samba and PowerBroker Identity Services configuration.<br \/>\nFor more information, see: <a href=\"https:\/\/wiki.samba.org\/index.php\/Setup_Samba_as_an_AD_Domain_Member\">https:\/\/wiki.samba.org\/index.php\/Setup_Samba_as_an_AD_Domain_Member<\/a><\/p>\n<h3>Installation and configuration<\/h3>\n<p><a href=\"https:\/\/github.com\/BeyondTrust\/pbis-open\/releases\">https:\/\/github.com\/BeyondTrust\/pbis-open\/releases<\/a><\/p>\n<p><code>wget https:\/\/github.com\/BeyondTrust\/pbis-open\/releases\/download\/8.6.0\/pbis-open-8.6.0.427.linux.x86_64.rpm.sh<br \/>\n.\/pbis-open-8.6.0.427.linux.x86_64.rpm.sh install<\/code><\/p>\n<p><code>\/opt\/pbis\/bin\/domainjoin-cli join --assumeDefaultDomain yes sub.domain.com domainjoinusername<br \/>\n\/opt\/pbis\/bin\/update-dns<\/code><\/p>\n<p><code>\/opt\/pbis\/bin\/get-status<\/code><\/p>\n<p><code>yum install samba-3.6.23<\/code><\/p>\n<p><code>mv \/etc\/samba\/smb.conf \/etc\/samba\/smb.conf_bk<\/code><\/p>\n<pre>vi \/etc\/samba\/smb.conf\r\n[global]\r\n        workgroup = SUB\r\n        realm = SUB.DOMAIN.COM\r\n        server string = %h server\r\n        security = ADS\r\n        map to guest = Bad User\r\n        pam password change = Yes\r\n        passwd program = \/usr\/bin\/passwd %u\r\n        passwd chat = *Enter\\snew\\s*\\spassword:* %n\\n *Retype\\snew\\s*\\spassword:* %n\\n *password\\supdated\\ssuccessfully* .\r\n        unix password sync = Yes\r\n;        syslog = 0\r\n        log file = \/var\/log\/samba\/log.%m\r\n;        max log size = 1000\r\n        load printers = No\r\n        printcap name = \/dev\/null\r\n        disable spoolss = Yes\r\n        dns proxy = No\r\n;        wins server = 10.10.10.10\r\n;        usershare allow guests = Yes\r\n        panic action = \/usr\/share\/samba\/panic-action %d\r\n;        idmap config * : range = 10000-33554431\r\n;        idmap config * : range = 3000-7999\r\n;        idmap config * : backend = tdb\r\n;        printing = bsd\r\n;        print command = lpr -r -P'%p' %s\r\n;        lpq command = lpq -P'%p'\r\n;        lprm command = lprm -P'%p' %j\r\n        machine password timeout = 0\r\n;        log level = 5\r\n;        debug pid = true\r\n\r\n[share]\r\n        path = \/smb\/share\r\n        valid users = @adgroup\r\n        force user = aduser\r\n        force group = domain^users\r\n        read only = No\r\n        acl check permissions = No\r\n        create mask = 0640\r\n        directory mask = 0750\r\n        browseable = No\r\n<\/pre>\n<p><code>\/opt\/pbis\/bin\/samba-interop-install --check-version<\/code><br \/>\nFound smbd version 3.6.23-46el6_9<br \/>\nSamba version supported<\/p>\n<p><code>\/opt\/pbis\/bin\/samba-interop-install --install --loglevel verbose<\/code><\/p>\n<p><code>service smb restart;service nmb restart;<\/code><\/p>\n<h3>Troubleshooting<\/h3>\n<p>Issue: The primary group domain sid(S-1-2-34-5678901234-5678901234-5678901234-567) does not match the domain sid(S-1-2-34-2414616913-1771598462-3719962008) for aduser(S-1-22-1-1234567890)<\/p>\n<p>Fix:<br \/>\n<code>net getdomainsid<br \/>\nnet setlocalsid S-1-2-34-5678901234-5678901234-5678901234-567<\/code><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n# net ads join -U administrator<br \/>\nEnter administrator&#8217;s password: Passw0rd<br \/>\nUsing short domain name &#8212; SUB<br \/>\nJoined &#8216;SMBTEST01V&#8217; to dns domain &#8216;sub.domain.com&#8217;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Debug:<br \/>\nsmbclient \/\/10.10.10.11\/share\/ -U SUB\/aduser<br \/>\nsmbclient -L 10.10.10.11 -U SUB\/aduser<br \/>\n\/opt\/pbis\/bin\/enum-users<br \/>\npbis status<br \/>\n\/opt\/pbis\/domainjoin-cli query<br \/>\n\/opt\/pbis\/bin\/lwsm list<br \/>\n\/opt\/pbis\/bin\/lwsm set-log-target -p lsass &#8211; file \/tmp\/lsass.log<br \/>\n\/opt\/pbis\/bin\/lwsm set-log-level -p lsass &#8211; debug<\/p>\n<p>&#8220;Troubleshooting PBIS-Samba Integration&#8221; from here <a href=\"https:\/\/www.beyondtrust.com\/wp-content\/uploads\/documentation-pbis-samba-integration-guide.pdf\">https:\/\/www.beyondtrust.com\/wp-content\/uploads\/documentation-pbis-samba-integration-guide.pdf<\/a><\/p>\n<p>Links:<br \/>\n<a href=\"https:\/\/www.beyondtrust.com\/wp-content\/uploads\/documentation-pbis-samba-integration-guide.pdf\">https:\/\/www.beyondtrust.com\/wp-content\/uploads\/documentation-pbis-samba-integration-guide.pdf<\/a><br \/>\n<a href=\"https:\/\/wiki.samba.org\/index.php\/Setting_up_Samba_as_a_Domain_Member\">https:\/\/wiki.samba.org\/index.php\/Setting_up_Samba_as_a_Domain_Member<\/a><br \/>\n<a href=\"https:\/\/github.com\/BeyondTrust\/pbis-open\/releases\">https:\/\/github.com\/BeyondTrust\/pbis-open\/releases<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Requirements Supported Samba versions: \u2013 Samba version 3.0.25 or later versions in the 3.0 series \u2013 Samba 3.2.X \u2013 Samba 3.4.X \u2013 Samba 3.5.X Winbind must be installed and running when you are using Samba version 3.0.25 or later versions in the 3.0 series. If you are using Samba version 3.2.X or 3.5.X, Winbind is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[231],"tags":[212,243,32,240,241,267,268,14,11],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/864"}],"collection":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/comments?post=864"}],"version-history":[{"count":3,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":867,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/864\/revisions\/867"}],"wp:attachment":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}