Setting up samba for File sharing.

Samba can be used to share files between different platforms mainly Unix/Linux and windows.
You can install samba 2 ways.
1.Download and compile the source code or binary package.
2.Configure the existing samba installation that comes with Solaris 10.

For this article we will edit the already installed version of samba.

First we can see the samba version or if it is in fact on our system

bash#/usr/sfw/sbin/smbd -V
Version 3.0.28


You can locate the smbd binary by running:

bash#find / -name smbd -print

Next to enable the SWAT tool for samba we run:

bash#vi /etc/services

and add the following line to the file.

swat    901/tcp        #samba web admin tool

Next edit the inetd.conf file

bash#vi /etc/inetd.conf

add the following line(s):

**Use tabs to separate the columns**

swat    stream    tcp    nowait    root    /usr/sfw/swat swat
netbios-ssn stream tcp nowait root /usr/sfw/sbin smbd

Force the inetd file to re-read the config file

bash#pkill -HUP inetd

On Solaris 10 and later, inetd is not used, but there is an automatic conversion program. Enter the
configureation details into inetd.conf and then run the following command.

bash# inetconv
100235/1 -> /var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml
Importing 100235_1-rpc_ticotsord.xml …Done
swat -> /var/svc/manifest/network/swat-tcp.xml
Importing swat-tcp.xml …Done

Samba should be ready to use and you can access the web admin  from http://localhost:901
If you need to start the services

bash#svcadm enable samba
bash#svcadm enable swat

samba swat

samba swat

Create a new share directory if it doesn’t already exist.

bash#mkdir /stash
bash#chmod 1777 /stash

Add a user to the system.

bash#useradd -u 4002 -g 10 -d -m /export/home/grandaddy grandaddy

set a password

bash#passwd grandaddy
password
password

You can now add the user to the smbpasswd database for authentication.

bash#/usr/sfw/bin/smbpasswd -a grandaddy
New SMB password:
Retype password:

Create a simple configuration file for samba

bash#vi /etc/sfw/smb.conf

[global]
## core networking options
netbios name = skynet
workgroup = purpz
encrypt passwords = yes
security = user

## netbios name service settings
wins support = yes

## logging
log level = 1
max log size = 1000

## default service options
read only = no

[homes]
comment = Home directories
path = /export/home/%u
browseable = no
writeable = yes

[stash]
comment = the stash spot for files
path = /stash
valid users = grandaddy
public = no

save and quit

View the fileshares on Solaris

bash#share
-    /stash    rw    “”

samba 3

samba 3

View the shares in windows server 2008

Run > skynet

enter user/pass

samba windows share

samba windows share

samba server share

samba server share

The files on the Solaris Side.

samba solaris share

samba solaris share

Tags: wan, vlan, router, vtp, study, cisco


Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Furl
  • Live
  • Reddit
  • StumbleUpon
  • Technorati
  • LinkedIn
  • Twitter

Comments are closed.

Search
Sponsor
Mail Server Monitoring

Page Rank