{"id":451,"date":"2011-01-28T00:30:38","date_gmt":"2011-11-19T05:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/solaris-10-sparc-activedirectory-integration-with-samba-3-0-23-from-blastwave\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-11-19T05:51:50","slug":"solaris-10-sparc-activedirectory-integration-with-samba-3-0-23-from-blastwave","status":"publish","type":"post","link":"\/blog\/index.php\/solaris-10-sparc-activedirectory-integration-with-samba-3-0-23-from-blastwave\/","title":{"rendered":"Solaris 10 Sparc ActiveDirectory integration with Samba 3.0.23 from blastwave"},"content":{"rendered":"<p>This is how to integrate the blastwave-provided samba 3.0.23 into a Windows 2003 Active Directory Primary Domain<br \/>\nController, using kerberos, ldap, nss, samba, winbind.<br \/>\nThis gets you to the stage where you can access your samba shares passwordless, when logged in as an<br \/>\nauthorized user to access them. This does not get you to login to your solaris server (ssh,telnet) with an<br \/>\nActiveDirectory user+pass.<br \/>\nFirst, set your pkg-get repo by editing \/opt\/csw\/etc\/pkg-get.conf:<br \/>\nurl=http:\/\/ibiblio.org\/pub\/packages\/solaris\/csw\/unstable<br \/>\nNow, we must get these pkgs:<br \/>\nCSWkrb5user, CSWkrb5libdev, CSWsamba, CSWsambaclient, CSWsambacommon,CSWsambalib,<br \/>\nCSWsambalibdev, CSWsambawb<br \/>\nWe do so by issuing:<br \/>\n# pkg-get -i krb5_user krb5_lib_dev samba samba_client samba_common samba_lib samba_libdev<br \/>\nsamba_wb<br \/>\nSeveral dependencies will be installed automagically:<br \/>\nCSWsasl, CSWoldaprt, CSWlibpopt, CSWlibnet, CSWlibcups, CSWkrb5lib, CSWiconv, CSWgettext,<br \/>\nCSWfam, CSWcommon<br \/>\nAfter getting all packages make sure you have samba 3.0.23 by issuing:<br \/>\n# pkginfo -l CSWsambalibdev CSWsamba CSWsambalib CSWsambacommon CSWsambaclient | grep<br \/>\nVERSION<br \/>\nVERSION: 3.0.23,REV=2006.08.09b<br \/>\nVERSION: 3.0.23,REV=2006.08.09b<br \/>\nVERSION: 3.0.23,REV=2006.08.09b<br \/>\nVERSION: 3.0.23,REV=2006.08.09b<br \/>\nVERSION: 3.0.23,REV=2006.08.09b<br \/>\nIt is very important that all versions above are equal and that you have 3.0.23.<br \/>\nWe can now configure, we start by configuring kerberos at \/etc\/krb5.conf, and make an exact copy at<br \/>\n\/opt\/csw\/etc\/krb 5.conf<br \/>\n[libdefaults]<br \/>\nclockskew = 300<br \/>\ndefault_realm = AWW.COM<br \/>\n[realms]<br \/>\nAWW.COM = {<br \/>\n139\/433<br \/>\nkdc = fwa-dc01.aww.com<br \/>\ndefault_domain = AWW<br \/>\nkpasswd_server = fwa-dc01.aww.com<br \/>\n}<br \/>\n[domain_realm]<br \/>\n.AWW = AWW.COM<br \/>\n[logging]<br \/>\ndefault = SYSLOG:NOTICE: DAEMON<br \/>\nkdc = FILE:\/var\/log\/kdc.log<br \/>\nkadmind = FILE:\/var\/log\/kadmind.log<br \/>\n[appdefaults]<br \/>\npam = {<br \/>\nticket_lifetime = 1d<br \/>\nrenew_lifetime = 1d<br \/>\nforwardable = true<br \/>\nproxiable = false<br \/>\nretain_after_close = false<br \/>\nminimum_uid = 0<br \/>\ndebug = false<br \/>\n}<br \/>\nWe now configure samba, the config file is at \/opt\/csw\/etc\/samba\/smb.conf<br \/>\n[global]<br \/>\nrealm = AWW.COM<br \/>\nworkgroup = AWW<br \/>\npassword server = fwa-dc01.aww.com<br \/>\nsecurity = ADS<br \/>\nencrypt passwords = yes<br \/>\nmap to guest = never<br \/>\nclient use spnego = yes<br \/>\nidmap uid = 10000-60000<br \/>\nwinbind gid = 10000-60000<br \/>\nwinbind use default domain = yes<br \/>\nnetbios name = netra<br \/>\nloglevel = 10<br \/>\ninterfaces = 172.16.1.38<br \/>\nbind interfaces only = yes<br \/>\n[200gb]<br \/>\ncomment = 200gb disk<br \/>\npath = \/200gb<br \/>\nread only = no<br \/>\npublic = yes<br \/>\nbrowseable = yes<br \/>\nwriteable = yes<br \/>\ncreate mode = 644<br \/>\nvalid users = AWWbmahock<br \/>\n[htdocs]<br \/>\ncomment = Apache htdocs<br \/>\npath = \/usr\/local\/apache2\/htdocs<br \/>\nread only = no<br \/>\npublic = yes<br \/>\nbrowseable = yes<br \/>\n140\/433<br \/>\nwriteable = yes<br \/>\ncreate mode = 644<br \/>\nvalid users = AWWbmahock<br \/>\nOur Windows 2003 ActiveDirectory PDC is called fwa-dc01. Our Solaris 10 server is called &#8220;netra&#8221; and it&#8217;s<br \/>\nfqdn is &#8220;netra.aww.com&#8221;, so we need to add that to \/etc\/hosts, please make sure the FQDN appears<br \/>\nFIRST!!!!!!!!!!! !!!!!<br \/>\n172.16.1.38 netra.aww.com netra loghost<br \/>\n172.16.1.55 fwa-dc01.aww.com fwa-dc01<br \/>\nWe don&#8217;t need to edit \/etc\/resolv.conf to add any particular dns settings.<br \/>\nWe need to add winbind to \/etc\/nsswitch.conf:<br \/>\npasswd: files winbind<br \/>\ngroup: files winbind<br \/>\nWe need to get libgroups in order for winbind to work, check http:\/\/www.blastwave.org\/~fredrik\/, and get<br \/>\nhttp:\/\/www.blast wave.org\/~fredrik\/libgroups.SPARC.so<br \/>\nI placed that at \/usr\/lib\/libgroups.SPARC.so, and as stated at that url, added a line to the top of<br \/>\n\/etc\/init.d\/cswsamba with:<br \/>\nLD_PRELOAD=\/usr\/lib\/libgroups.SP ARC.so<br \/>\nNow we can join samba to the AD PDC and start rolling!<br \/>\nIf not already there, set \/opt\/csw\/* in the PATH<br \/>\n# export PATH=$PATH:\/opt\/csw\/sbin:\/opt\/csw\/bin<br \/>\nKill any already running samba:<br \/>\n# pkill winbindd<br \/>\n# pkill smbd<br \/>\n# pkill nmbd<br \/>\n# \/etc\/init.d\/cswsamba stop<br \/>\nDestroy any kerberos ticket we might have:<br \/>\n# \/opt\/csw\/bin\/kdestroy<br \/>\nTest ticket creation to the AD PDC, this will test if ur \/etc\/krb5.conf and \/opt\/csw\/etc\/krb5.conf is ok<br \/>\n# \/opt\/csw\/bin\/kinit Administrator@AWW.COM<br \/>\nPassword for Administrator@AWW.COM:<br \/>\nDelete any previous instance of our server in the AD<br \/>\n# \/opt\/csw\/bin\/net ads leave -U Administrator<br \/>\nAdministrator&#8217;s password:<br \/>\nJoin our samba server to the AD<br \/>\n141\/433<br \/>\n# \/opt\/csw\/bin\/net ads join -U Administrator<br \/>\nAdministrator&#8217;s password:<br \/>\nUsing short domain name &#8212; AWW<br \/>\nJoined &#8216;NETRA&#8217; to realm &#8216;AWW.COM&#8217;<br \/>\nStart all samba daemons<br \/>\n# \/etc\/init.d\/cswsamba start<br \/>\nNow test if all is ok:<br \/>\nDisplay samba status:<br \/>\nbash-3.00# \/opt\/csw\/bin\/smbclient -L netra -U%<br \/>\nDomain=[AWW] OS=[Unix] Server=[Samba 3.0.23b]<br \/>\nSharename Type Comment<br \/>\n&#8212;&#8212;&#8212; &#8212;- &#8212;&#8212;-<br \/>\n200gb Disk 200gb disk<br \/>\nhtdocs Disk Apache htdocs<br \/>\nIPC$ IPC IPC Service (Samba 3.0.23b)<br \/>\nDomain=[AWW] OS=[Unix] Server=[Samba 3.0.23b]<br \/>\nServer Comment<br \/>\n&#8212;&#8212;&#8212; &#8212;&#8212;-<br \/>\nNETRA Samba 3.0.23b<br \/>\nWorkgroup Master<br \/>\n&#8212;&#8212;&#8212; &#8212;&#8212;-<br \/>\nAWW<br \/>\nCheck for Domains we belong to, this is very important!!! our domain (AWW) must be there!<br \/>\nbash-3.00# wbinfo -m<br \/>\nAWW<br \/>\nCheck for users in the domain:<br \/>\nbash-3.00# wbinfo -u<br \/>\nAdministrator<br \/>\nGuest<br \/>\nSUPPORT_388945a0<br \/>\nkrbtgt<br \/>\nbmahock<br \/>\ntpsmith<br \/>\nquser<br \/>\nCheck for groups in the domain:<br \/>\nbash-3.00# wbinfo -g<br \/>\nBUILTINadministrators<br \/>\nBUILTINDomain Computers<br \/>\nDomain Controllers<br \/>\nSchema Admins<br \/>\nEnterprise Admins<br \/>\nDomain Admins<br \/>\n142\/433<br \/>\nDomain Users<br \/>\nDomain Guests<br \/>\nGroup Policy Creator Owners<br \/>\nDnsUpdateProxy<br \/>\nGet information for a user, this would test that you configured \/etc\/nsswitch.conf ok with winbind, and that it is<br \/>\nusing \/lib\/libnss_winbind.so<br \/>\nbash-3.00# getent passwd &#8220;bmahock&#8221;<br \/>\nbmahock:*:10004: 10002:Brian Mahocker:\/home\/AWW\/bmahock:\/bin\/false<br \/>\nNow test if you did really join through ActiveDirectory, using &#8220;net ads&#8221; queries:<br \/>\nbash-3.00# net ads testjoin<br \/>\nJoin is OK<br \/>\nbash-3.00# net ads info<br \/>\nLDAP server: 172.16.1.55<br \/>\nLDAP server name: fwa-dc01.aww.com<br \/>\nRealm: AWW.COM<br \/>\nBind Path: dc=AWW,dc=COM<br \/>\nLDAP port: 389<br \/>\nServer time: Sat, 02 Feb 2008 11:13:52 CST<br \/>\nKDC server: 172.16.1.55<br \/>\nServer time offset: 76<br \/>\nNow get all ActiveDirectory properties for your computer:<br \/>\nbash-3.00# net ads status<br \/>\nobjectClass: top<br \/>\nobjectClass: person<br \/>\nobjectClass: organizationalPerson<br \/>\nobjectClass: user<br \/>\nobjectClass: computer<br \/>\ncn: netra<br \/>\ndistinguishedName: CN=netra,CN=Computers,DC=aww, DC=com<br \/>\ninstanceType: 4<br \/>\nwhenCreated: 20080202171033.0 Z<br \/>\nwhenChanged: 20080202171208.0 Z<br \/>\nuSNCreated: 45102<br \/>\nuSNChanged: 45137<br \/>\nname: netra<br \/>\nobjectGUID: bea32ea2-8208-4119-9d4c-87186a3866c4<br \/>\nuserAccountControl: 69632<br \/>\nbadPwdCount: 0<br \/>\ncodePage: 0<br \/>\ncountryCode: 0<br \/>\nbadPasswordTime: 0<br \/>\nlastLogoff: 0<br \/>\nlastLogon: 128464460293750000<br \/>\nlocalPolicyFlags: 0<br \/>\npwdLastSet: 0<br \/>\nprimaryGroupID: 515<br \/>\nobjectSid: S-1-5-21-875145104-1252384033-126309636-1125<br \/>\n143\/433<br \/>\naccountExpires: 9223372036854775807<br \/>\nlogonCount: 13<br \/>\nsAMAccountName: netra$<br \/>\nsAMAccountType: 805306369<br \/>\ndNSHostName: netra.aww.com<br \/>\nservicePrincipalName: HOST\/netra.aww.com<br \/>\nservicePrincipalName: HOST\/NETRA<br \/>\nobjectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=aww,DC=com<br \/>\nisCriticalSystemObject: FALSE<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8211; Security Descriptor (revision: 1, type: 0x8c14)<br \/>\nowner SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\ngroup SID: S-1-5-21-875145104-1252384033-126309636-513<br \/>\n&#8212;&#8212;- (system) ACL (revision: 4, size: 120, number of ACEs: 2)<br \/>\n&#8212;&#8212;- ACE (type: 0x07, flags: 0x5a, size: 0x38, mask: 0x20, object flags: 0x3)<br \/>\naccess SID: S-1-1-0<br \/>\naccess type: AUDIT OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x07, flags: 0x5a, size: 0x38, mask: 0x20, object flags: 0x3)<br \/>\naccess SID: S-1-1-0<br \/>\naccess type: AUDIT OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- (user) ACL (revision: 4, size: 1908, number of ACEs: 39)<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x00, size: 0x24, mask: 0xf01ff)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED<br \/>\nPermissions: [Full Control]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x00, size: 0x18, mask: 0xf01ff)<br \/>\naccess SID: S-1-5-32-548<br \/>\naccess type: ALLOWED<br \/>\nPermissions: [Full Control]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x00, size: 0x14, mask: 0xf01ff)<br \/>\naccess SID: S-1-5-18<br \/>\naccess type: ALLOWED<br \/>\nPermissions: [Full Control]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x00, size: 0x24, mask: 0x301d4)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED<br \/>\nPermissions:<br \/>\n[List Contents]<br \/>\n[Read All Properties]<br \/>\n[Delete Subtree]<br \/>\n[List Object]<br \/>\n[Change Password]<br \/>\n[Reset Password]<br \/>\n[Delete]<br \/>\n[Read Permissions]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x38, mask: 0x20, object flags: 0x1)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n144\/433<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x00, size: 0x14, mask: 0x20094)<br \/>\naccess SID: S-1-5-11<br \/>\naccess type: ALLOWED<br \/>\nPermissions:<br \/>\n[List Contents]<br \/>\n[Read All Properties]<br \/>\n[List Object]<br \/>\n[Read Permissions]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x28, mask: 0x100, object flags: 0x1)<br \/>\naccess SID: S-1-1-0<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Change Password]<br \/>\n[Reset Password]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x00, size: 0x14, mask: 0x3)<br \/>\naccess SID: S-1-5-10<br \/>\naccess type: ALLOWED<br \/>\nPermissions:<br \/>\n[Create All Child Objects]<br \/>\n[Delete All Child Objects]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x2c, mask: 0x3, object flags: 0x1)<br \/>\naccess SID: S-1-5-32-550<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Create All Child Objects]<br \/>\n[Delete All Child Objects]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x38, mask: 0x30, object flags: 0x1)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-517<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x28, mask: 0x8, object flags: 0x1)<br \/>\naccess SID: S-1-5-10<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[All validate writes]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x28, mask: 0x30, object flags: 0x1)<br \/>\naccess SID: S-1-5-10<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x28, mask: 0x8, object flags: 0x1)<br \/>\naccess SID: S-1-5-10<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[All validate writes]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x38, mask: 0x8, object flags: 0x1)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[All validate writes]<br \/>\n145\/433<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x38, mask: 0x8, object flags: 0x1)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[All validate writes]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x48, mask: 0x20, object flags: 0x3)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x48, mask: 0x20, object flags: 0x3)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x48, mask: 0x20, object flags: 0x3)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x48, mask: 0x20, object flags: 0x3)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-512<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Write All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x00, size: 0x2c, mask: 0x10, object flags: 0x1)<br \/>\naccess SID: S-1-5-32-560<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x12, size: 0x18, mask: 0xf01bd)<br \/>\naccess SID: S-1-5-32-544<br \/>\naccess type: ALLOWED<br \/>\nPermissions:<br \/>\n[Create All Child Objects]<br \/>\n[List Contents]<br \/>\n[All validate writes]<br \/>\n[Read All Properties]<br \/>\n[Write All Properties]<br \/>\n[List Object]<br \/>\n[Change Password]<br \/>\n[Reset Password]<br \/>\n[Delete]<br \/>\n[Read Permissions]<br \/>\n[Modify Permissions]<br \/>\n[Modify Owner]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x12, size: 0x24, mask: 0xf01ff)<br \/>\naccess SID: S-1-5-21-875145104-1252384033-126309636-519<br \/>\naccess type: ALLOWED<br \/>\nPermissions: [Full Control]<br \/>\n&#8212;&#8212;- ACE (type: 0x00, flags: 0x12, size: 0x18, mask: 0x4)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED<br \/>\n146\/433<br \/>\nPermissions:<br \/>\n[List Contents]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x2c, mask: 0x20094, object flags: 0x2)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[List Contents]<br \/>\n[Read All Properties]<br \/>\n[List Object]<br \/>\n[Read Permissions]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x2c, mask: 0x20094, object flags: 0x2)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[List Contents]<br \/>\n[Read All Properties]<br \/>\n[List Object]<br \/>\n[Read Permissions]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n147\/433<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x3c, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x2c, mask: 0x20094, object flags: 0x2)<br \/>\naccess SID: S-1-5-32-554<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[List Contents]<br \/>\n[Read All Properties]<br \/>\n[List Object]<br \/>\n[Read Permissions]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x38, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-9<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x1a, size: 0x38, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-9<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;- ACE (type: 0x05, flags: 0x12, size: 0x38, mask: 0x10, object flags: 0x3)<br \/>\naccess SID: S-1-5-9<br \/>\naccess type: ALLOWED OBJECT<br \/>\nPermissions:<br \/>\n[Read All Properties]<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8211; End Of Security Descriptor<br \/>\nIf all these tests are ok, your samba is joined correctly to the AD domain.<br \/>\nSlackware 12 Samba 3.0.28 bound to Windows 2003 Active Directory<br \/>\nThis is how to get a Slackware 12 bound to a Windows 2003 Active Directory, using AD (kerberos\/ldap).<br \/>\nFirst, you need a windows 2003 server, with Active Directory enabled, i assume you know how to do that<br \/>\npart, in my case this one is called fwa-dc01.<br \/>\n148\/433<br \/>\n172.16.1.55 fwa-dc01 fwa-dc01.aww.com<br \/>\nNow with our slackware 12&#8230; This one is called &#8220;kraftek&#8221;<br \/>\n172.16.1.50 kraftek kraftek.aww.com<br \/>\nWe will use all slack12 included packages except samba, so please make sure these pkgs are at<br \/>\n\/var\/log\/packages:<br \/>\nkrb5-1.6.1-i686-2dl<br \/>\ncyrus-sasl-2.1.22-i486-1<br \/>\nopenldap-client-2.3.36-i686-1dl<br \/>\nopenssl-0.9.8e-i 486-3<br \/>\nopenssl-solibs-0.9.8e-i486-3<br \/>\ndb42-4.2.52-i486-3<br \/>\ndb44-4.4.20-i486-2<br \/>\nThen we should get the latest samba sources, we need to build SAMBA, since the slackware 12 included<br \/>\nsamba does not support ActiveDirectory. The release i got is samba 3.0.28, from<br \/>\nhttp:\/\/us4.samba.org\/samba\/ftp\/stable\/samba-3.0.28.tar.gz<br \/>\nafter uncompressing, it all fell into \/builds\/samba-3.0.28, so i did:<br \/>\n# cd \/builds\/samba-3.0.28\/source<br \/>\n# .\/configure &#8211;with-ads &#8211;with-winbind &#8211;with-smbmount &#8211;prefix=\/usr\/samba_ad &#8211;with-pam<br \/>\n# make &amp;&amp; make install<br \/>\nThis builds it all and places samba at \/usr\/samba_ad<br \/>\nWe also need to install the nss helpers to our system default directories:<br \/>\n# cp \/builds\/samba-3.0.28\/source\/nsswitch\/libnss_winbind.so \/lib<br \/>\n# cp \/builds\/samba-3.0.28\/source\/nsswitch\/libnss_wins.so \/lib<br \/>\n# ln -s \/lib\/libnss_winbind.so \/lib\/libnss_winbind.so.2<br \/>\n# ln -s \/lib\/libnss_wins.so \/lib\/libnss_wins.so.2<br \/>\nThen, we need to configure Kerberos ;), i placed this in \/etc\/krb5.conf:<br \/>\n[libdefaults]<br \/>\nclockskew = 300<br \/>\ndefault_realm = AWW.COM<br \/>\n[realms]<br \/>\nAWW.COM = {<br \/>\nkdc = fwa-dc01.aww.com<br \/>\ndefault_domain = AWW<br \/>\nkpasswd_server = fwa-dc01.aww.com<br \/>\n}<br \/>\n[domain_realm]<br \/>\n.AWW = AWW.COM<br \/>\n[logging]<br \/>\ndefault = SYSLOG:NOTICE: DAEMON<br \/>\nkdc = FILE:\/var\/log\/kdc.log<br \/>\nkadmind = FILE:\/var\/log\/kadmind.log<br \/>\n[appdefaults]<br \/>\n149\/433<br \/>\npam = {<br \/>\nticket_lifetime = 1d<br \/>\nrenew_lifetime = 1d<br \/>\nforwardable = true<br \/>\nproxiable = false<br \/>\nretain_after_close = false<br \/>\nminimum_uid = 0<br \/>\ndebug = false<br \/>\n}<br \/>\nOf course we need to edit \/etc\/hosts and add our Active Directory PDC there, and our server name with a<br \/>\nfqdn, both belonging to aww.com(our AD domain):<br \/>\n172.16.1.55 fwa-dc01 fwa-dc01.aww.com<br \/>\n172.16.1.50 kraftek kraftek.aww.com<br \/>\nWe do not really need to do much at \/etc\/resolv.conf, we don&#8217;t need DNS lookups to AD here.<br \/>\nWe need to modify \/etc\/nsswitch.conf, and add &#8220;winbind&#8221; as an option to passwd and group:<br \/>\npasswd: files compat winbind<br \/>\ngroup: files compat winbind<br \/>\nNotice that for this to work you REALLY have to have \/lib\/libnss_winbind.so in place!!!<br \/>\nNow we configure SAMBA, the SAMBA we compiled looks for its smb.conf at \/usr\/samba_ad\/lib\/smb.conf, so<br \/>\nthat&#8217;s where we place it, and it has:<br \/>\n[global]<br \/>\nrealm = AWW.COM<br \/>\nworkgroup = AWW<br \/>\npassword server = fwa-dc01.aww.com<br \/>\nsecurity = ADS<br \/>\nencrypt passwords = yes<br \/>\nmap to guest = never<br \/>\nclient use spnego = yes<br \/>\nidmap uid = 10000-60000<br \/>\nwinbind gid = 10000-60000<br \/>\nwinbind use default domain = yes<br \/>\nnetbios name = kraftek<br \/>\nloglevel = 10<br \/>\ninterfaces = 172.16.1.50<br \/>\nbind interfaces only = yes<br \/>\n[200gb]<br \/>\ncomment = 200gb disk<br \/>\npath = \/200gb<br \/>\nread only = no<br \/>\npublic = yes<br \/>\nbrowseable = yes<br \/>\nwriteable = yes<br \/>\ncreate mode = 644<br \/>\nvalid users = AWWbmahock<br \/>\n[htdocs]<br \/>\ncomment = Apache htdocs<br \/>\npath = \/usr\/local\/apache2\/htdocs<br \/>\n150\/433<br \/>\nread only = no<br \/>\npublic = yes<br \/>\nbrowseable = yes<br \/>\nwriteable = yes<br \/>\ncreate mode = 644<br \/>\nvalid users = AWWbmahock<br \/>\nGood, notice we&#8217;re using security=ADS and we specify the realm and workgroup, and our windows 2003<br \/>\nserver is fwa-dc01.aww. com, just as in \/etc\/hosts<br \/>\nNow it is time to make the machinery move!!!!!!!<br \/>\nGet our PATH set up to use our samba<br \/>\n# export PATH=$PATH:\/usr\/samba_ad\/sbin:\/usr\/samba_ad\/bin<br \/>\nKill any existing samba<br \/>\n# pkill winbindd<br \/>\n# pkill smbd<br \/>\n# pkill nmbd<br \/>\nDestroy all kerberos tickets we have<br \/>\n# kdestroy<br \/>\nGet a kerberos ticket from our windows 2003 PDC, this reads \/etc\/krb5.conf<br \/>\n# kinit Administrator@AWW.COM<br \/>\nPassword for Administrator@AWW.COM:<br \/>\nJoin our windows 2003 AD domain<br \/>\n# \/usr\/samba_ad\/bin\/net ads join -U Administrator<br \/>\nAdministrator&#8217;s password:<br \/>\nUsing short domain name &#8212; AWW<br \/>\nJoined &#8216;KRAFTEK&#8217; to realm &#8216;AWW.COM&#8217;<br \/>\nStart our samba deamons<br \/>\n# \/usr\/samba_ad\/sbin\/winbindd -B<br \/>\n# \/usr\/samba_ad\/sbin\/smbd -D<br \/>\n# \/usr\/samba_ad\/sbin\/nmbd -D<br \/>\nTest our config<br \/>\n# \/usr\/samba_ad\/bin\/smbclient -L kraftek -U%<br \/>\nDomain=[AWW] OS=[Unix] Server=[Samba 3.0.28]<br \/>\nSharename Type Comment<br \/>\n&#8212;&#8212;&#8212; &#8212;- &#8212;&#8212;-<br \/>\n200gb Disk 200gb disk<br \/>\nhtdocs Disk Apache htdocs<br \/>\nIPC$ IPC IPC Service (Samba 3.0.28)<br \/>\ndeskjet Printer Hp deskjet 845c at Home<br \/>\nDomain=[AWW] OS=[Unix] Server=[Samba 3.0.28]<br \/>\n151\/433<br \/>\nServer Comment<br \/>\n&#8212;&#8212;&#8212; &#8212;&#8212;-<br \/>\nKRAFTEK Samba 3.0.28<br \/>\nWorkgroup Master<br \/>\n&#8212;&#8212;&#8212; &#8212;&#8212;-<br \/>\nAWW<br \/>\nCheck what are our trusted users, a list should appear, including users at our Windows 2003 PDC<br \/>\n# \/usr\/samba_ad\/bin\/wbinfo -u<br \/>\nadministrator<br \/>\nguest<br \/>\nsupport_388945a0<br \/>\nkrbtgt<br \/>\nbmahock<br \/>\ntpsmith<br \/>\nquser<br \/>\nCheck our known groups, this should list our windows 2003 groups<br \/>\n# \/usr\/samba_ad\/bin\/wbinfo -g<br \/>\nBUILTINadministrators<br \/>\nBUILTINusers<br \/>\ndomain computers<br \/>\ndomain controllers<br \/>\nschema admins<br \/>\nenterprise admins<br \/>\ndomain admins<br \/>\ndomain users<br \/>\ndomain guests<br \/>\ngroup policy creator owners<br \/>\ndnsupdateproxy<br \/>\nCheck our trusted domains, this is extra important!!!, our windows 2003 domain (AWW) should be there!<br \/>\n# \/usr\/samba_ad\/bin\/wbinfo -m<br \/>\nAWW<br \/>\nGetent should give us details of any Windows 2003 user, this passes thru \/etc\/nsswitch.conf, then uses<br \/>\n\/lib\/libnss_winbind.so, connects to the running winbind daemon and queries the windows pdc<br \/>\n# getent passwd &#8220;AWWbmahock&#8221;<br \/>\nbmahock:*:10000: 10006:Brian Mahocker:\/home\/AWW\/bmahock:\/bin\/false<br \/>\nFinally , do a test authentication with wbinfo, if this, and all previous tests work, you have a single sign on<br \/>\nSamba, bound to a Windows 2003 Active Directory<br \/>\n# wbinfo -a &#8220;bmahock%R3515t0l1&#8221;<br \/>\nplaintext password authentication succeeded<br \/>\nchallenge\/response password authentication succeeded<br \/>\nEnjoy<br \/>\n152\/433<br \/>\n153\/433<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is how to integrate the blastwave-provided samba 3.0.23 into a Windows 2003 Active Directory Primary Domain Controller, using kerberos, ldap, nss, samba, winbind. This gets you to the stage where you can access your samba shares passwordless, when logged in as an authorized user to access them. This does not get you to login [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}