{"id":1442,"date":"2022-05-25T04:26:43","date_gmt":"2022-05-25T04:26:43","guid":{"rendered":"\/blog\/?p=1442"},"modified":"2022-08-22T13:21:35","modified_gmt":"2022-08-22T13:21:35","slug":"solaris-11-ad-join","status":"publish","type":"post","link":"\/blog\/index.php\/solaris-11-ad-join\/","title":{"rendered":"Solaris 11 AD join"},"content":{"rendered":"\n<p>Solaris Samba Server Configuration Steps<br><br>&#8211; Configure DNS Client<br>Configuration must include Windows AD Servers as DNS Servers and specify the AD Domain as the DNS Domain<br><br>\/etc\/resolv.conf<br><br>nameserver 10.x.x.x<br>search example.com<br><br>&#8211; Configure Kerberos<br>Create \/etc\/krb5.conf<br><br><code>[libdefaults]<br>&nbsp;&nbsp;&nbsp; default_realm = EXAMPLE.COM<br>&nbsp;&nbsp;&nbsp; dns_lookup_realm = false<br>&nbsp;&nbsp;&nbsp; dns_lookup_kdc = true<\/code><br><br>&#8211; Confirm system time is synchronized with AD Servers. NTP is recommended to keep system time accurate.<br>Difference of 3-5 minutes between the Samba and AD Servers will result in Domain join failures<br><br># ntpdate ad.example.com<br><br>&#8211; Samba Server local hostname \/ nodename resolution must be a fully qualified hostname.<br>The \/etc\/hosts entry for the Samba Server needs to be a FQDN to avoid Domain join failures<br><br>\/etc\/hosts<br><br>10.x.x.x &nbsp;&nbsp;&nbsp;&nbsp; host.example.com&nbsp;&nbsp;&nbsp; host<br><br># getent hosts host<br>10.x.x.x &nbsp;&nbsp;&nbsp;&nbsp; host.example.com&nbsp;&nbsp;&nbsp; host<br><br>If modified after initial configuration boot up it can be modified with the command:<br><br># svccfg -s svc:\/system\/identity:node setprop config\/nodename =&nbsp; host.example.com<br># svcadm refresh svc:\/system\/identity:node<br>&nbsp;<br>&#8211; Create the \/etc\/samba\/smb.conf file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;global]\n\n       realm = EXAMPLE.COM\n       workgroup = EXAMPLE\n       security = ADS\n       server string =Solaris Samba Server\n       kerberos method = system keytab\n       include system krb5 conf = no\n       loglevel = 10\n\n      # Winbind configuration:\n\n       winbind separator = \/\n      # set enum=no , this increases performance considerably\n       winbind enum users = no\n       winbind enum groups = no\n       winbind expand groups = no\n\n       template homedir = \/export\/home\/ad\/%D_%U\n       template shell = \/bin\/bash\n\n       idmap config * : backend = autorid\n       idmap config * : range = 100000-4000000000\n       idmap config * : rangesize = 1000000\n\n       allow trusted domains = yes\n       winbind refresh tickets = yes\n\n     # all these are addons\n#winbind use default domain = Yes\nlocal master = No\npreferred master = No\nbind interfaces only = Yes\nname resolve order = bcast lmhosts host wins\ndns proxy = no\nunix extensions = no\ndomain master = no\nsocket options = TCP_NODELAY SO_KEEPALIVE\nclient schannel = no\n<\/code><\/pre>\n\n\n\n<p><code><br><\/code><br>&nbsp;<br>&#8211; Edit the \/etc\/nsswitch.conf to add winbind to the passwd: and group: entries if AD username and group resolution for files and directories is needed<br><br>Solaris 10<br><br>passwd: files winbind [ TRYAGAIN = 3 ]<br>group: files winbind [ TRYAGAIN = 3 ]<br><br><br>Solaris 11<br><br># svccfg -s svc:\/system\/name-service\/switch setprop config\/default = astring: files<br># svccfg -s svc:\/system\/name-service\/switch setprop config\/password = astring: &#8220;files winbind [ TRYAGAIN = 3 ]&#8221;<br># svccfg -s svc:\/system\/name-service\/switch setprop config\/group = astring: &#8220;files winbind [ TRYAGAIN = 3 ]&#8221;<br># svccfg -s svc:\/system\/name-service\/switch setprop config\/host = astring: &#8220;files dns mdns winbind&#8221;<br># svccfg -s svc:\/system\/name-service\/switch setprop config\/printer = astring: &#8220;user files&#8221;<br># svcadm refresh svc:\/system\/name-service\/switch<br><br><br>The next steps are to enable the samba and winbind services and join the Samba Server to the Windows Domain,<br>To join the Domain a system administrator will use a Windows Domain username that had administrator rights, privileges in the Windows AD Domain.<br><br>&#8211; Enable the Samba service<br><br># svcadm enable samba<br><br>Confirm the samba service is online<br><br># svcs samba<br>STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STIME&nbsp;&nbsp;&nbsp; FMRI<br>online&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15:06:22 svc:\/network\/samba:default<br><br>&#8211; Join the Samba server to the Domain as a User with Windows Domain Administrator rights<br><br># net ads join -U &lt;USER&gt;<br>Enter &lt;USER&gt; password:<br>Using short domain name &#8212; &lt;DOMAIN_NAME&gt;<br>Joined &#8216;&lt;HOST&gt;&#8217; to realm &#8216;&lt;DOMAIN_NAME&gt;&#8217;<br><br>Enable the Winbind service<br><br># svcadm enable winbind<br><br>&#8211; Wait 2-3 minutes for winbind Service to initialize<br><br>&#8211; Confirm that the samba and winbind services are online:<br><br># svcs samba winbind<br>STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STIME&nbsp;&nbsp;&nbsp; FMRI<br>online&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15:06:22 svc:\/network\/samba:default<br>online&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15:09:55 svc:\/network\/winbind:default<br><br>&#8211; Confirm that winbindd can be communicated with and return ADS usernames and groups with the commands:<br><br>wbinfo -p<br>wbinfo -u<br>wbinfo -g<br><br>&#8211; Confirm that the Solaris NSS functions (configured via the \/etc\/nsswitch.conf) can return&nbsp; Windows ADS user information<br><br>getent passwd | grep Windows_Domain_Username<br><br>For example:<br># getent passwd | grep &lt;USER&gt;<br>&lt;DOMAIN_NAME&gt;+&lt;USER&gt;:*:&lt;UID&gt;:&lt;GID&gt;:&lt;USER&gt;:\/&lt;PATH&gt;\/&lt;USER&gt;:\/bin\/csh<br><br>Once completed a Windows Client system should be able to map a share from the Solaris Samba server and authenticate using the users Windows Domain\/ADS username and password.<\/p>\n\n\n\n<p>&#8211; If it is intended for ADS users to login to the Solaris Samba server via ssh or telnet a pam.conf file with winbind references should be moved into place.Note: Solaris 10 with Samba Patch 119757-20 SPARC \/ 119758-20 X86 or later installed the pam.conf-winbind2 file provided as a attachment in Document&nbsp;<a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?parent=DOCUMENT&amp;sourceId=1494126.1&amp;id=1413786.1\">1413786.1<\/a>&nbsp;should be used in the following steps<\/p>\n\n\n\n<p># cd \/etc<\/p>\n\n\n\n<p># cp pam.conf pam.conf.bak<\/p>\n\n\n\n<p># cp pam.conf-winbind pam.confNote: In Solaris 11.1 and later the PAM configuration has been updated. To add the Winbind PAM module to the configuration make the following modifications<\/p>\n\n\n\n<p>Edit the files located under \/etc\/pam.d\/ and add the line for pam_winbind.so.1 as shown in each one of the following files.<br><br><br># pwd<br>\/etc\/pam.d<br><br># cat login<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\n# Copyright (c) 2012, 2020, Oracle and\/or its affiliates. All rights reserved.\n#\n# PAM configuration\n#\n# console and tty login service\n#\nauth definitive         pam_user_policy.so.1\nauth requisite          pam_authtok_get.so.1\nauth sufficient         pam_winbind.so.1 try_first_pass\nauth sufficient         pam_unix_auth.so.1\nauth required           pam_unix_cred.so.1\n<\/code><\/pre>\n\n\n\n<p># cat other<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\n# Copyright (c) 2012, 2020, Oracle and\/or its affiliates. All rights reserved.\n#\n# PAM configuration\n#\n# Default definitions for Authentication management\n# Used when service name is not explicitly mentioned for authentication\n#\nauth definitive         pam_user_policy.so.1\nauth requisite          pam_authtok_get.so.1\nauth sufficient         pam_unix_auth.so.1\n#auth sufficient         pam_winbind.so.1 try_first_pass\nauth required           pam_unix_cred.so.1\nauth required         pam_winbind.so.1 try_first_pass\n#\n# Default definition for Account management\n# Used when service name is not explicitly mentioned for account management\n# pam_tsol_account(7) returns PAM_IGNORE if the system is not configured\n# with Trusted Extensions (TX) enabled.\n# pam_tsol_account(7) does need to run in the Trusted Path for ensuring remote\n# hosts connecting to the global zone have a CIPSO host type.\n#\naccount requisite       pam_roles.so.1\naccount definitive      pam_user_policy.so.1\naccount sufficient      pam_unix_account.so.1\naccount sufficient      pam_winbind.so.1 try_first_pass\naccount required        pam_tsol_account.so.1\n#\n# Default definition for Session management\n# Used when service name is not explicitly mentioned for session management\n#\nsession definitive      pam_user_policy.so.1\nsession sufficient      pam_unix_session.so.1\nsession sufficient      pam_winbind.so.1 try_first_pass\nsession optional        pam_fm_notify.so.1\n#\n# Default definition for Password management\n# Used when service name is not explicitly mentioned for password management\n#\npassword definitive     pam_user_policy.so.1\n# Password construction requirements apply to all users.\n# Edit \/usr\/lib\/security\/pam_authtok_common and remove force_check\n# to have the traditional authorized administrator bypass of construction\n# requirements.\npassword include        pam_authtok_common\npassword required       pam_authtok_store.so.1\n<\/code><\/pre>\n\n\n\n<p><br><br># cat sudo<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\n# Copyright (c) 2016, 2019, Oracle and\/or its affiliates. All rights reserved.\n#\n# PAM configuration for sudo(8) (explicit because we exclude\n# pam_unix_session(7)).\n#\nsession required        pam_allow.so.1\n#\n# sudo service account stack (explicit because of non-usage of pam_roles.so.1)\n#\naccount sufficient      pam_winbind.so.1        try_first_pass\naccount definitive      pam_user_policy.so.1\naccount required        pam_unix_account.so.1\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solaris Samba Server Configuration Steps &#8211; Configure DNS ClientConfiguration must include Windows AD Servers as DNS Servers and specify the AD Domain as the DNS Domain \/etc\/resolv.conf nameserver 10.x.x.xsearch example.com &#8211; Configure KerberosCreate \/etc\/krb5.conf [libdefaults]&nbsp;&nbsp;&nbsp; default_realm = EXAMPLE.COM&nbsp;&nbsp;&nbsp; dns_lookup_realm = false&nbsp;&nbsp;&nbsp; dns_lookup_kdc = true &#8211; Confirm system time is synchronized with AD Servers. NTP is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1442","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1442","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=1442"}],"version-history":[{"count":15,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1442\/revisions"}],"predecessor-version":[{"id":1513,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1442\/revisions\/1513"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1442"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}