Rabu, 02 Januari 2008

laporan linux "samba"

SAMBA

Mengecek Instalasi
$ dpkg –l |grep

Contoh : $ dpkg –l |grep samba

Apabila dikomputer sudah terinstal program samba maka akan muncul :
user@himatif :~$ dpkg –l |grep samba
ii samba 3.0.22-1ubuntu3 a
LanManager-like file and printer server fo
ii samba-common 3.0.22-1ubuntu3
Samba common files used by both the server a

Jika sudah terinstall, untuk mencari lokasi program samba gunakan locate samba tapi sebelum itu gunakan updatedb untuk mengupdate database.
user@himatif :~$ updatedb
user@himatif :~$ locate samba

Mengkonfigurasi
Konfigurasi pada Ubuntu
Konfigurasi samba terdapat pada file smb.conf, yang letakknya difolder /etc/samba/ jadi silakan masuk ke folder tersebut dan gunakan program vi untuk mengkonfigurasi file smb.conf
#
# Sample configuration file for the Samba suite for Debian GNU/Linux
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# “testparm” to check that you have not made any basic syntactic
# errors.
#
#-------------------------Global Settings-----------------------
[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of workgroup = MSHOME
# server string is the equivalent of the NT Description field
Server string = %h server (Samba, Ubuntu)
# Windows Internet Name Serving Support Section:
# WINS Support = Tells the NMBD component of Samba to enable its WINS Server
; wins support = no
1,1 Top

Isi dari file smb.conf merupakan konfigurasi dari program samba. Cara mensetting printer sebagai berikut :
$ cp /etc/samba/smb.conf /etc/samba/smb.conf.asli

Setelah itu masuk ke file smb.conf melalui program vi, isi dari file smb.conf merupakan konfigurasi dari program samba dan menggandakannya ke dalam smb.conf.asli
Lalu konfigurasi ulang file smb.conf dengan mengganti seperti berikut :
# vi /etc/samba/smb.conf

[global]

Workgroup = HIMATIF #harus sama dengan yang ada di windows
Security = share

Setelah itu restart, caranya :
user@himatif :~Ssudo /etc/init.d/samba stop
user@himatif :~Ssudo /etc/init.d/samba start


Setelah programsamba dijalankan, pastikan bahwa firewall dalam keadaan mati.
Ubuntu sebagai server
1.Tambahkan konfigurasi berikut pada file smb.conf, kemudian simpan konfigurasi tersebut.
user@himatif :~$ vi/etc/samba/smb.conf
[data]
Public = yes
Path = /home/data
browseable = yes
writable = no
guest ok = yes

2.Kemudian di restart
user@himatif :~Ssudo /etc/init.d/samba stop
user@himatif :~Ssudo /etc/init.d/samba start

Konfigurasi pada Windows
 Masuk ke Control Panel > klik network connection
 Klik kanan Local Area Network pilih Properties atau
 Klik kanan icon mycomputer > pilih Propeties
 Klik kanan Local Area Network pilih Properties
 Pastikan File and Printer Sharing for Microsoft Network sudah dipilih

Sharing File
Windows sebagai Server
Silakan tentukan apa yang ingin di share misalkan Drive c :
1.Klik my computer
2.Klik kanan Drive C : pilih Sharing dan ubahlah nama file sharing dengan “coba”
3.Lalu pada Ubuntu buat direktori difolder/mnt
Contoh /mnt/samba
user@himatif :~$vmkdir /mnt/samba

Mounting
user@himatif :~$ smbmount /// /mnt/samba –U WinUser –P WinUserPass

Contoh :
user@himatif :~$ smbmount //user1/coba /mnt/samba –U user1 –P capekdeh

Masuk ke folder /mnt/samba
user@himatif :~$ cd /mnt/samba

Tidak ada komentar: