Jaringan Dasar : File Sharing (SAMBA Server) - Info Saja

Thursday, November 06, 2008

Jaringan Dasar : File Sharing (SAMBA Server)


Pada file sharing di windows menggunakan Server Messege Block (SMB) sehingga pada masing-masing hosts yang saling terkoneksi dalam jaringan dapat saling bertukar file maupun printer. Agar file-file di linux dapat dikenali oleh hosts windows maka perlu digunakan applikasi khusus agar mesin linux seolah-olah oleh windows dikenali sebagai os windows juga, untuk keperluan ini pada diperlukan applikasi SAMBA yang diinstall pada linux

4.1. Instalasi

Untuk instalasinya kita dapat menggunakan command line berikut:

#apt-get install samba

4.2. Konfigurasi

Edit file /etc/samba/smb.conf seperti dibawah dan sesuaikan dengan kebutuhan, perhatikan text yang dicetak tebal

#======================= Global Settings =======================
[global]

## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = workgroup
# server string is the equivalent of the NT Description field
server string = %h server (Samba %v)
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
;wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast
#.
#................................ dipotong …………………………………………
#.
####### Authentication #######
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
# package for details.
; security = user
security = share
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam guest
obey pam restrictions = yes
guest account = nobody
invalid users = root
# ………………………… dipotong ………………………………….
#.
[public]
comment = public
path = /home/public
browseable = yes
read only =yes
guest ok = yes
public = yes
# A sample share for sharing your CD-ROM with others.
[cdrom]
comment = Samba server's CD-ROM
writable = no
locking = no
path = /cdrom
public = yes

########EOF###########

Kemudian restart service untuk sambanya

4.3. Penggunaan

Untuk penggunaanya sama seperti kita menggunakan file sharing diwindows, sehingga kita bisa membuka atau mengcopy file dari server samba menggunakan windows explorer seperti biasa.