Sun Cluster Data Service for Samba Guide for Solaris OS

ProcedureExample: Download and Configure Samba from http://www.samba.org

  1. Setup your PATH environment.


    Note –

    You PATH must contain the wget utility.



    Vigor5# PATH=/usr/cluster/bin:/opt/SUNWspro/bin:/usr/sfw/bin: \
    > /usr/sbin:/usr/bin:/usr/ccs/bin
    Vigor5# export PATH
    
  2. Setup install directories in the global zone


    Vigor5# cd /local/samba
    Vigor5# mkdir 3.2.22 software
    Vigor5# ln -s 3.0.22 latest
    Vigor5# ln -s /local/samba/latest /opt/samba
    
  3. Setup install directories in the non-global zones


    Vigor5# zlogin whole ln -s /local/samba/latest /opt/samba
    Vigor5# zlogin sparse ln -s /local/samba/latest /opt/samba
    
  4. Download, Extract and Install Kerberos.


    Vigor5# cd /local/samba/software
    Vigor5# wget http://web.mit.edu/kerberos/dist/krb5/1.4/krb5-1.4.3-signed.tar
    Vigor5# tar -xfBp krb5*tar
    Vigor5# gunzip -c krb5*.tar.gz | tar -xfBp -
    Vigor5# rm krb5*tar*
    Vigor5# cd krb5*/src
    Vigor5# CC=/opt/SUNWspro/bin/cc ./configure --prefix=/opt/samba \
    > --enable-dns-for-realm
    Vigor5# make
    Vigor5# make install
    
  5. Download, Extract and Install OpenLDAP.


    Note –

    You must obtain a fix for Bug ID: 6419029 which describes a problem when compiling OpenLDAP before proceeding with this step.



    Vigor5# cd /local/samba/software
    Vigor5# wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.3.24.tgz
    Vigor5# gunzip -c openldap-2.3.24.tgz | tar -xfBp -
    Vigor5# rm openldap-2.3.24.tgz
    Vigor5# cd openldap*
    Vigor5# CC=/opt/SUNWspro/bin/cc \
    > CPPFLAGS="-I/opt/samba/include" \
    > LDFLAGS="-L/opt/samba/lib -R/opt/samba/lib" ./configure --prefix=/opt/samba \
    > --disable-slapd --disable-slurpd
    Vigor5# make depend
    Vigor5# make
    Vigor5# make install
    
  6. Download, Extract and Install Samba.


    Vigor5# cd /local/samba/software
    Vigor5# wget http://us3.samba.org/samba/ftp/old-versions/samba-3.0.22.tar.gz
    Vigor5# gunzip -c samba-3.0.22.tar.gz | tar -xfBp -
    Vigor5# rm samba-3.0.22.tar.gz
    Vigor5# cd samba*/source
    Vigor5# CC=/opt/SUNWspro/bin/cc \
    > CFLAGS=-I/opt/samba/include \
    > LDFLAGS="-L/opt/samba/lib -R/opt/samba/lib" ./configure --prefix=/opt/samba \
    > --with-ads --with-krb5=/opt/samba --with-shared-modules=idmap_rid
    Vigor5# make
    Vigor5# make install
    
  7. Copy and symlink winbind files in the global zone.


    Vigor5# cd /local/samba/software
    Vigor5# cp nsswitch/libnss_winbind.so /usr/lib
    Vigor5# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1
    Vigor5# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1
    
  8. Copy and symlink winbind files in the non-global zones.


    Note –

    The sparse zone inherits /usr/lib, so this step is only required for the whole zone.



    Vigor5# cd /local/samba/software
    Vigor5# cp nsswitch/libnss_winbind.so /zones/whole/root/usr/lib
    Vigor5# ln -s /usr/lib/libnss_winbind.so /zones/whole/root/usr/lib/libnss_winbind.so.1
    Vigor5# ln -s /usr/lib/libnss_winbind.so /zones/whole/root/usr/lib/nss_winbind.so.1
    
  9. Setup and symlink the Kerberos krb5.conf file in the global zone.


    Vigor5# cat > /etc/krb5.conf <<-EOF
    [libdefaults]
            default_realm = ADS.EXAMPLE.COM
    
    [realms]
            ADS.EXAMPLE.COM = {
                    kdc = 192.168.1.9
                    admin_server = 192.168.1.9
            }
    
    [domain_realm]
            .your.domain.name = ADS.EXAMPLE.COM
            your.domain.name = ADS.EXAMPLE.COM
    EOF
    Vigor5#
    Vigor5# rm /etc/krb5/krb5.conf
    Vigor5# ln -s /etc/krb5.conf /etc/krb5/krb5.conf