Go to main content

Oracle® Solaris Cluster Data Service for Samba Guide

Exit Print View

Updated: February 2020
 
 

Registering and Configuring HA for Samba

This section contains the procedure to configure HA for Samba resources.

How to Configure Resources for Samba and winbind

Perform this procedure on one node of the cluster only.

Before You Begin

  1. Assume a role that provides solaris.cluster.modify authorization.
  2. If winbind is required, create, register, and enable a winbind resource.
    1. Edit the samba_config file and follow the comments within that file.

      Ensure that SERVICES="winbindd" is specified.

      phys-schost-1# cd /opt/SUNWscsmb/util
      phys-schost-1# vi samba_config
    2. Register the resource.
      phys-schost-1# ./samba_register
    3. Enable the resource.
      phys-schost-1# clresource enable winbind-resource
  3. Configure an encrypted password for the Samba fault monitor.

    Perform this step on each node in the cluster.

    1. Set up the encrypted user password for the Samba fault monitor.
      phys-schost-N# touch /var/cluster/scsmb_key/opt/SUNWscsmb/.samba-lh_passwd
      phys-schost-N# chmod 600 /var/cluster/scsmb_key/opt/SUNWscsmb/.samba-lh_passwd
      
      phys-schost-N# dd if=/dev/urandom of=/var/cluster/scsmb_key bs=16 count=1
      phys-schost-N# chmod 400 /var/cluster/scsmb_key
      
      phys-schost-N# echo 'password' | /usr/sfw/bin/openssl enc -aes128 -e -pass \
      file:/var/cluster/scsmb_key -out /opt/SUNWscsmb/.samba-lh-passwd
      phys-schost-N# chmod 400 /opt/SUNWscsmb/.samba-lh_passwd
    2. Verify that the decrypted password matches the password for user hasmb within the Windows Active Directory domain.
      phys-schost-N# /usr/sfw/bin/openssl enc -aes128 -d \
      -pass file:/var/cluster/scsmb_key -in /opt/SUNWscsmb/.samba-lh_passwd
  4. Create, register, and enable a Samba resource.
    1. Edit the samba_config file and follow the comments within that file.

      Ensure that SERVICES="smbd" or SERVICES="smbd,nmbd" is specified.

      phys-schost-1# cd /opt/SUNWscsmb/util
      phys-schost-1# vi samba_config
    2. Register the resource.
      phys-schost-1# ./samba_register
    3. Ensure that Samba is dependent on winbind.
      phys-schost-1# clresource set -p Resource_dependencies=winbind-resource{local_node} \
      samba-resource
    4. Enable the Samba resource.
      phys-schost-1# clresource enable samba-resource

Next Steps

Go to Verifying the HA for Samba Installation and Configuration.