Go to main content

Oracle® Solaris Cluster Data Service for Samba Guide

Exit Print View

Updated: September 2015
 
 

Example: Enable Samba Software to Run in the Cluster

  1. On all zone-cluster nodes, set up the encrypted Samba fault monitor user password.
    zc-node-N# touch /var/cluster/scsmb_key /opt/SUNWscsmb/.samba-lh_passwd 
    zc-node-N# chmod 600 /var/cluster/scsmb_key /opt/SUNWscsmb/.samba-lh_passwd 
    
    zc-node-N# dd if=/dev/urandom of=/var/cluster/scsmb_key bs=16 count=1 
    zc-node-N# chmod 400 /var/cluster/scsmb_key 
    
    zc-node-N# echo 'password' | /usr/sfw/bin/openssl enc -aes128 -e -pass \
    file:/var/cluster/scsmb_key -out /opt/SUNWscsmb/.samba-lh_passwd 
    zc-node-N# chmod 400 /opt/SUNWscsmb/.samba-lh_passwd
  2. On all zone-cluster nodes, confirm that the decrypted password matches the password configured for user hasmb within the Windows Active Directory domain.
    zc-node-N# /usr/sfw/bin/openssl enc -aes128 -d -pass file:/var/cluster/scsmb_key \ 
    -in /opt/SUNWscsmb/.samba-lh_passwd
  3. From one node of the zone cluster, create the HA for Samba configuration file for the winbind resource.
    zc-node-1# vi /var/tmp/samba_config-winbind-rs
    
    RS=winbind-rs
    RG=samba-rg
    RS_LH=samba-lh-rs
    RS_HAS=samba-hasp-rs
    SERVICES="winbindd"
    
    BINDIR=/usr/bin
    SBINDIR=/usr/sbin
    CFGDIR=/failover/samba/samba-lh
    FMUSER=hasmb
    
    SAMBA_LOGDIR=/failover/samba/samba-lh/logs
    SAMBA_FMPASS=encrypted
    SAMBA_FMDOMAIN=OSC
    
    WINBIND_DISCACHE=FALSE
    WINBIND_SINGLEMODE=FALSE
    
    RS_ZONE=
    LHOST=
    PROJECT=default
    TIMEOUT=30
  4. From one node of the zone cluster, create the HA for Samba configuration file for the Samba resource.
    zc-node-1# vi /var/tmp/samba_config-samba-rs
    
    RS=samba-rs
    RG=samba-rg
    RS_LH=samba-lh-rs
    RS_HAS=samba-hasp-rs
    SERVICES="smbd,nmbd"
    
    BINDIR=/usr/bin
    SBINDIR=/usr/sbin
    CFGDIR=/failover/samba/samba-lh
    FMUSER=hasmb
    
    SAMBA_LOGDIR=/failover/samba/samba-lh/logs
    SAMBA_FMPASS=encrypted
    SAMBA_FMDOMAIN=OSC
    
    WINBIND_DISCACHE=FALSE
    WINBIND_SINGLEMODE=FALSE
    
    RS_ZONE=
    LHOST=
    PROJECT=default
    TIMEOUT=30
  5. From one node of the zone cluster, register the HA for Samba data service for winbind and Samba.
    zc-node-1# /opt/SUNWscsmb/util/samba_register -f /var/tmp/samba_config-winbind-rs
    zc-node-1# /opt/SUNWscsmb/util/samba_register -f /var/tmp/samba_config-samba-rs
  6. From one node of the zone cluster, configure the resource dependency between the samba-rs and winbind-rs resources.
    zc-node-1# clresource set -p Resource_dependencies+=winbind-rs samba-rs
  7. From one node of the zone cluster, enable the resources.
    zc-node-1# clresource enable winbind-rs
    zc-node-1# clresource enable samba-rs