CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Selasa, 28 Oktober 2008

Tutorial Samba

Kuliah Umum IlmuKomputer.ComCopyright © 2004 IlmuKomputer.ComTutorial Samba Tutorial SambaAskari Azikindaeng_rewa@students.stttelkom.ac.idAbstrak:Samba (server message block) adalah protokol file sharing dan printer sharing untuk menyaingi protokol yangtelah ada yakni Novell’s IPX-based. SMB ini merupakan protokol file sharing dan printer sharing pertama yangdapat berjalan pada multi protokol: TCP/IP, NetBEUI, IPX/SPX. Dengan kata lain SMB server dapatmenggantikan posisi Novell server tanpa harus merubah infrastruktur dari jaringan itu sendiri.
Server LAN untuk pemakai Ms-Windows dan GNU/LinuxSamba (server message block) adalah protokol file sharing dan printer sharing untuk menyaingiprotokol yang telah ada yakni Novell’s IPX-based. SMB ini merupakan protokol file sharing danprinter sharing pertama yang dapat berjalan pada multi protokol: TCP/IP, NetBEUI, IPX/SPX.Dengan kata lain SMB server dapat menggantikan posisi Novell server tanpa harus merubahinfrastruktur dari jaringan itu sendiri.Konfigurasi SambaLogin sebagai user root, kemudian lakukan editing dengan menggunakan text editor pada file /etc/samba/smb.confkari@debian:~# pico /etc/samba/smb.confBerikut file konfigurasi samba.conf :[global]# Change this for the workgroup/NT-domain name your Samba server will partofworkgroups = edo391Lisensi Dokumen:Copyright © 2004 IlmuKomputer.ComSeluruh dokumen di IlmuKomputer.Com dapat digunakan, dimodifikasi dan disebarkan secarabebas untuk tujuan bukan komersial (nonprofit), dengan syarat tidak menghapus atau merubahatribut penulis dan pernyataan copyright yang disertakan dalam setiap dokumen. Tidakdiperbolehkan melakukan penulisan ulang, kecuali mendapatkan ijin terlebih dahulu dariIlmuKomputer.Com.Kuliah Umum IlmuKomputer.ComCopyright © 2004 IlmuKomputer.Com# server string is the equivalent of the NT Description fieldserver string = %h server (Samba %v); guest account = nobodyinvalid users = root# If you want Samba to log though syslog only then set the following# parameter to 'yes'. Please note that logging through syslog in# Samba is still experimental.; syslog only = no# We want Samba to log a minimum amount of information to syslog.Everything# should go to /var/log/samba/log.{smb,nmb} instead. If you want to log# through syslog you should set the following parameter to somethinghigher.syslog = 0# "security = user" is always a good idea. This will require a Unixaccount# in this server for every user accessing the server. See# security_level.txt for details.; security = user# You may wish to use password encryption. Please read ENCRYPTION.txt,# Win95.txt and WinNT.txt in the Samba documentation. Do not enable this# option unless you have read those documentsencrypt passwords = false# Using the following line enables you to customise your configuration# on a per machine basis. The %m gets replaced with the netbios name# of the machine that is connecting; include = /home/samba/etc/smb.conf.%m# Most people will find that this option gives better performance.# See speed.txt and the manual pages for details# You may want to add the following on a Linux system:# SO_RCVBUF=8192 SO_SNDBUF=8192socket options = TCP_NODELAY# --- Browser Control Options ---# Please _read_ BROWSING.txt and set the next four parameters according# to your network setup. The defaults are specified below (commented# out.) It's important that you read BROWSING.txt so you don't break# browsing in your network!# set local master to no if you don't want Samba to become a master# browser on your network. Otherwise the normal election rules apply; local master = yes2Kuliah Umum IlmuKomputer.ComCopyright © 2004 IlmuKomputer.Com# OS Level determines the precedence of this server in master browser# elections. The default value should be reasonable; os level = 20# --- End of Browser Control Options ---# Windows Internet Name Serving Support Section:# WINS Support - Tells the NMBD component of Samba to enable it's WINSServer; 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 hostnames# to IP addresses; name resolve order = lmhosts host wins bcast# Name mangling options; preserve case = yes; short preserve case = yes# This boolean parameter controlls whether Samba attempts to sync. theUnix# password with the SMB password when the encrypted SMB password in the# /etc/samba/smbpasswd file is changed.; unix password sync = false# For Unix password sync. to work on a Debian GNU/Linux system, thefollowing# parameters must be set (thanks to Augustin Luton for# sending the correct chat script for the passwd program in DebianPotato).passwd program = /usr/bin/passwd %upasswd chat = *Enter\snew\sUNIX\spassword:* %n\n*Retype\snew\sUNIX\spassword:* %n\n .# This boolean controls whether PAM will be used for password changes# when requested by an SMB client instead of the program listed in# 'passwd program'. The default is 'no'.; pam password change = no# The following parameter is useful only if you have the linpopup package# installed. The samba maintainer and the linpopup maintainer are3Kuliah Umum IlmuKomputer.ComCopyright © 2004 IlmuKomputer.Com# working to ease installation and configuration of linpopup and samba.; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &obey pam restrictions = yes# Some defaults for winbind (make sure you're not using the ranges# for something else.); winbind uid = 10000-20000; winbind gid = 10000-20000; template shell = /bin/bash#======= Share Definitions ========[homes]comment = Home Directoriesbrowseable = yespublic = yesread only = yes[win_i]comment = berisi lagu - lagubrowseable = yesread only = yespublic = yesguest ok = yeswritable = nopath = /windows/win_i/# By default, the home directories are exported read-only. Change next# parameter to 'yes' if you want to be able to write to them.writable = no# File creation mask is set to 0700 for security reasons. If you want to# create files with group=rw permissions, set next parameter to 0775.create mask = 0700# Directory creation mask is set to 0700 for security reasons. If you wantto# create dirs. with group=rw permissions, set next parameter to 0775.directory mask = 0700# Un-comment the following and create the netlogon directory for DomainLogons# (you need to configure Samba to act as a domain controller too.);[netlogon]; comment = Network Logon Service; path = /home/samba/netlogon; guest ok = yes; writable = no; share modes = no4Kuliah Umum IlmuKomputer.ComCopyright © 2004 IlmuKomputer.Com[printers]comment = All Printersbrowseable = yespath = /tmpprintable = yespublic = yeswritable = nocreate mode = 0700locking = no# A sample share for sharing your CD-ROM with others.[cdrom]comment = Samba server's CD-ROMwritable = yeslocking = nopath = /cdrompublic = yes# The next two parameters show how to auto-mount a CD-ROM when the# cdrom share is accesed. For this to work /etc/fstab must contain# an entry like this:## /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0## The CD-ROM gets unmounted automatically after the connection to the## If you don't want to use auto-mounting/unmounting make sure the CD# is mounted on /cdrom#; preexec = /bin/mount /cdrom; postexec = /bin/umount /cdromKeterangan:Workgroup : setiap host atau client yang terhubung ke dalam satu jaringan yang sama (satu group)baik windows ataupun linux harus memiliki workgroup yang sama.guest account : diset sebagai nobody; guest account ini mengatur pemberian hak izin write ke semuauserSecurity : option defaultnya adalah “user”, “share”, “server”, dan “domain”comment : komentar tentang drive tersebutpath : letak direktori yang akan dishareread-only : option defaultnya adalah “yes” sehingga semua host yang ada tidak dapatmelakukan perubahan apapun terhadap drive tersebut5Kuliah Umum IlmuKomputer.ComCopyright © 2004 IlmuKomputer.Comlocking : hak izin read only untuk filesystem ataupun perangkat device (CD-ROM)browseable : Option defaultnya adalah “yes” sehingga drive yang dishare akan tampak padakomputer lainPublic : option ini menyebabkan semua host dapat mengaksesfile atau direktori yang tershare tanpa adanya permintaan password dari komputer tersebutguest ok : fungsinya sama dengan publiccreate mode : option ini untuk mengatur hak–hak yang akan diberikan kepada host lain terhadap fileatau direktori yang akan dishare.writable : option ini memberikan hak azas kepada host lain untuk melakukan perubahan pada fileatau direktori yang anda share. Pilihan defaulnya adalah “no”.Setelah anda melakukan perubahan pada file konfigurasi di atas, restart kembali service samba andauntuk mendapatkan perubahan pada file konfigurasi tersebut. Perintah yang digunakan adalah:Kari@debian:~# /etc/init.d/samba restartUntuk melihat file atau direktori yang telah anda dan komputer lain share, anda dapat menggunakanbrowser konqueror yang mendukung protokol samba. Pada Url ketikkan smb://namahost atausmb://IP addressJika nama host atau IP_address yang anda masukkan ada dalam jaringan anda, maka konquerorwebrowser akan menampilkan isi dari direktori yang dishare oleh komputer lain.Selain mengakses file sharing dengan browser konqueror, anda juga menggunakan LinNeighborhoodyang tampilannya mirip dengan My Network Places pada microsoft windows.

0 komentar: