Sei sulla pagina 1di 3

How to configure SAMBA in Solaris

updated Jun 6, 2012 5:45 am | 153,238 views


SAMBA theory

Samba is a file server by which we can share file(s) betwen Sun Solaris (box) and
Windows.

NOTE: By using NFS we can share files in Solaris only.

By using Samba we can share files in hetergeneous environment.

Contents [Hide TOC]


1 Main configuration file
2 daemons
3 protocols
4 How to configure SAMBA on Sun Solaris 5.9
5 How to add a user to samba
[edit]Main configuration file
/etc/sfw/smb.conf

port numbers

137 & 139

[edit]daemons
smbd & nmbd

[edit]protocols
smb (servers message block) all samba commands are available in (/usr/sfw/bin)

Daemonds

nmbt daemon provides netbios name severices

[edit]How to configure SAMBA on Sun Solaris 5.9


Installation of SAMBA at server side.

Samba Packagare are found into Solaris 5.9 2/2 CD Change to the directory

cd /cdrom/cdrom0/S*/P* -> Product Directory of 2/2 CD


Install packages

pkgadd -d . SUNWsmbar SUNWsmbau SUNWmbac SUNWsmbas


After package installation completion change directory to

cd /etc/sfw
ls
cp smb.conf-example smb.conf
vi smb.conf

18 workgroup=myworkgroup -> change workgroup name (max 8 charactors)

67 ;password server = 200.200.0.2 -> give local machine IP where ou are


configuring SAMBA

^ |- remove comments
75 ;encrypt password=yes

^ |- remove comments ;local master=yes ^ |- remove comments ;domain login=yes ^


|- remove comments ;domain master=yes ^ |- remove comments preferred master=yes ^
|- remove comments

[myshare]
comment=samba share
path=/pub
valid user=u1 u2 -> user names
public = no -> If you want to share to all pulbic make changes to "yes"
writeable=yes
printable=no
create mask = 0765 -> FAP (file access permission)
^ |- remove all comments

wq!
Save the file

cd /etc/init.d -> Samba service store here


./samba stop
./samba start

How to create samba user(s)

useradd -d /usr/u1 -m u1
passwd u1
useradd -d /usr/u2 -m u2
passwd u2
How to create samba user password file

cd /usr/sfw/bin
./smbpasswd -a u1 -> NOTE: samba password & sun solaris password (/etc/passwd) file
must be same
Option -a : Create smbpasswd file

| NOTE: User testparm for testing smb.conf for errors |

cd ..
pwd
/usr/sfw

cd /etc/sfw/private -> samba password file


ls
secretes.tbd smbpasswd

cd /usr/sfw/bin
[edit]How to add a user to samba
./smbclient -U u1 -L SAMBA-SERVER-NAMe
^
| _____ User name

How to shared resource

mkdir /datashare
cd /sharedata
touch d1 a1 d2 a2
chmod 777 /sharedata

How to share a particular directory


mkdir /comman
cd /comman
touch t1 t2 t3 t4
vi /etc/sfw/smb.conf
[commondir] path=/comman writeable=yes

wq!
pgreb -1 mbd
pkill -HUP nmbd
pkill -HUP smbd

Client side configuration {Windows 98/XP}

-> change workgroup name : my-home -> Assign IP if possible -> Change login setting
-> Login by using samba user id & password -> Check out for network neighbour hood

Potrebbero piacerti anche