Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Networking

Basic Samba Configuration on Solaris 10

Submitted by on August 20, 2013 – 2:21 pm

Here’s a sample process for installing and configuring a basic Samba server on Solaris 10.

Use the Solaris 10 installation DVD or download Solaris 10 installation DVD ISO. If you are using the ISO file, here’s how to mount it:

mkdir /mnt/dvd ; mount -F hsfs -o ro `lofiadm -a /path/to/sol-10-u11-ga-sparc-dvd.iso ` /mnt/dvd

For the sake of convenience, you can create the “mountiso” command:
mkdir -p /var/adm/bin
cat << EOF > /var/adm/bin/mountiso.sh
#!/bin/ksh
if [ -f $1 ] && [ -d $2 ]
then
        mkdir -p "$2"
        mount -F hsfs -o ro `lofiadm -a $1` $2
else
        echo "Usage: mountiso /path/file.iso /mnt/mountpoint"
fi
EOF
chmod 755 /var/adm/bin/mountiso.sh

Create a symbolic link to the script:
ln -s /var/adm/bin/mountiso.sh /usr/bin/mountiso

And use it like so:
mountiso /path/to/sol-10-u11-ga-sparc-dvd.iso /mnt/dvd

Install additional packages required to run a Samba server:
for i in SUNWlibpopt SUNWsmbaS SUNWsmbac SUNWsmbar SUNWsmbau ; do echo y | pkgadd -d /mnt/dvd/Solaris_10/Product $i ; done

Create a baseline /etc/samba/smb.conf
mkdir -p /etc/samba ; chmod 666 /etc/samba ; mkdir -p /nfsshare
cat << EOF > /etc/samba/smb.conf
[global]
        workgroup = SMBFS
        server string = `hostname` CIFS Server
        log file = /var/adm/samba_log.%m
        security = SHARE

[nfsshare]
        comment = nfsshare
        path = /nfsshare
        force user = root
        force group = root
        read only = No
        guest ok = Yes
EOF

In this example, the /nfsshare path with will be shared to all users with full access. This level of access should only be used for testing and disabled afterwards.

Enable Samba server and verify functionality:

svcadm enable samba wins
svcs samba wins

root@nfsmaster# svcs samba wins
STATE          STIME    FMRI
online         Aug_15   svc:/network/wins:default
online         Aug_15   svc:/network/samba:default

Try to connect to the share from Windows: //`hostname`/nfsshare

Print Friendly, PDF & Email

Leave a Reply