Home > Informatika, Linux, Networking, Windows > Instalasi dan Konfigurasi Samba di Ubuntu 8.04

Instalasi dan Konfigurasi Samba di Ubuntu 8.04

Instalasi Samba
1. Sebelum instalasi, download paket samba di http://packages.ubuntu.com/hardy/
a. libsmbclient (libsmbclient_3.0.28a-1ubuntu4.4_i386.deb)
b. samba-common (samba-common_3.0.28a-1ubuntu4.4_i386.deb)
c. samba (samba_3.0.28a-1ubuntu4.4_i386.deb)
d. smbclient (smbclient_3.0.28a-1ubuntu4.4_i386.deb)
e. smbfs (smbfs_3.0.28a-1ubuntu4.4_i386.deb)


2. Install libsmbclient

root@komputerdepan-desktop:/samba# dpkg -i libsmbclient_3.0.28a-1ubuntu4.4_i386.deb 
(Reading database ... 95750 files and directories currently installed.)
Preparing to replace libsmbclient 3.0.28a-1ubuntu4 (using libsmbclient_3.0.28a-1ubuntu4.4_i386.deb) ...
Unpacking replacement libsmbclient ...
Setting up libsmbclient (3.0.28a-1ubuntu4.4) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

3. Install samba-common

root@komputerdepan-desktop:/samba# dpkg -i samba-common_3.0.28a-1ubuntu4.4_i386.deb 
(Reading database ... 95750 files and directories currently installed.)
Preparing to replace samba-common 3.0.28a-1ubuntu4.4 (using samba-common_3.0.28a-1ubuntu4.4_i386.deb) ...
Unpacking replacement samba-common ...
Setting up samba-common (3.0.28a-1ubuntu4.4) ...

4. Install smbclient

root@komputerdepan-desktop:/samba# dpkg -i smbclient_3.0.28a-1ubuntu4.4_i386.deb 
(Reading database ... 95750 files and directories currently installed.)
Preparing to replace smbclient 3.0.28a-1ubuntu4 (using smbclient_3.0.28a-1ubuntu4.4_i386.deb) ...
Unpacking replacement smbclient ...
Setting up smbclient (3.0.28a-1ubuntu4.4) ...

5. Install smbfs

root@komputerdepan-desktop:/samba# dpkg -i smbfs_3.0.28a-1ubuntu4.4_i386.deb 
Selecting previously deselected package smbfs.
(Reading database ... 95750 files and directories currently installed.)
Unpacking smbfs (from smbfs_3.0.28a-1ubuntu4.4_i386.deb) ...
Setting up smbfs (3.0.28a-1ubuntu4.4) ...

6. Install samba

root@komputerdepan-desktop:/samba# dpkg -i samba_3.0.28a-1ubuntu4.4_i386.deb 
Selecting previously deselected package samba.
(Reading database ... 95767 files and directories currently installed.)
Unpacking samba (from samba_3.0.28a-1ubuntu4.4_i386.deb) ...
Setting up samba (3.0.28a-1ubuntu4.4) ...
Generating /etc/default/samba...
tdbsam_open: Converting version 0 database to version 3.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Importing account for nobody...ok
Importing account for komputerdepan...ok
Importing account for second...ok
Importing account for a123...ok
Importing account for a88...ok
Importing account for b123...ok
Importing account for c123...ok
Importing account for d88...ok
Importing account for win...ok
Adding group `sambashare' (GID 125) ...
Done.
Adding user `komputerdepan' to group `sambashare' ...
Adding user komputerdepan to group sambashare
Done.
Adding user `second' to group `sambashare' ...
Adding user second to group sambashare
Done.
 * Starting Samba daemons                                                                 [ OK ] 

Konfigurasi samba
Konfigurasi samba ada di file smb.conf yang berada di /etc/samba/
1. Edit file tersebut menggunakan editor vi/pico/nano/gedit

root@komputerdepan-desktop:/samba# pico /etc/samba/smb.conf

Pada bagian workgroup, isikan dengan mana workgroupnya. Pada bagian security = user, ganti dengan security share.

workgroup Lab2
security = share

Untuk ujicoba sharing data, tambahkan baris berikut di akhir file

 [Coba Share]
	comment = Buat coba coba
	path = /home/komputerdepan/Documents
	create mask = 0600
	directory mask = 0700

2. Simpan dan jalankan testparm

root@komputerdepan-desktop:/samba# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Coba Share]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
	server string = %h server (Samba, Ubuntu)
	map to guest = Bad User
	obey pam restrictions = Yes
	passdb backend = tdbsam
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	invalid users = root

[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	printable = Yes
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers

[Coba Share]
	comment = Buat coba coba
	path = /home/komputerdepan/Documents
	create mask = 0600
	directory mask = 0700

3. Menjalankan samba:

root@komputerdepan-desktop:/samba# /etc/init.d/samba start
 * Starting Samba daemons                                                                 [ OK ] 

4. Menghentikan samba

root@komputerdepan-desktop:/samba# /etc/init.d/samba stop
 * Stopping Samba daemons                                                                 [ OK ] 

5. Merestart samba :

root@komputerdepan-desktop:/samba# /etc/init.d/samba restart
 * Stopping Samba daemons                                                                 [ OK ] 
 * Starting Samba daemons                                                                 [ OK ] 

6. Kalau samba sudah dijalankan, sekarang browsing melalui komputer Windows. Sebelumnya pastikan dulu antara komputer tersebut sudah diseting IP nya dan sudah terhubung.
Browsing menggunakan Explorer, ketik di address bar : \\IPkompLinux
Contoh : \\192.168.1.1\
Maka akan tampak file/folder yang dishare di komputer Linux.

cobashare

7. Untuk melihat share file yang ada di komputer Windows dari komputer Linux, harus dilakukan mounting dari komputer Linux.
Sebagai contoh, berikut saya share direktori data di D:\ dari komputer Windows.

sharedata

Cara mounting :
syntak : smbmount //IPWindows/dirshare /dirsharedilinux smbfs 0 0
contoh : smbmount //192.168.1.5/data /home/komputerdepan/lima 0 0

root@komputerdepan-desktop:/samba# smbmount //192.168.1.5/data /home/komputerdepan/lima 0 0
Password: 

Masukkan password dan enter.
Selanjutnya browse menggunakan nautilus di Ubuntu. Seperti tampak pada gambar. Gampang kan?

Categories: Informatika, Linux, Networking, Windows Tags:
  1. datuck
    December 25th, 2009 at 00:14 | #1
    Using Mozilla Firefox Mozilla Firefox 3.0.16 on Ubuntu Linux Ubuntu Linux

    salam,
    trims atas ilmuny mas sngt brmanfaat untuk newbe ky sy.
    mas wiwin sy ingin bertany kok kl mw liat data yg dishare dr komplinux ke kompwindows ga bs kbuka y? sy ud mngikuti langkah2 dr installasi samp config sambany.
    pas dcoba ketik di addressbar windows \\ipkomplinux muncul “interup parameter…………..”. padahal workgrup ud sm, ping ip-ny jg masing2 ud reply.
    tp kl ngbuka yg dr windows ke linux bs gag ad masalah.
    tolong pencerahanny y mas. trimakasi.
    kl ga keberatan mohon minta tlg kirimin ke email sy y file smb.conf -nya. mw liat letak perbedaanny dmn. mohon trimakasi 😀
    wass,

  2. December 25th, 2009 at 14:01 | #2
    Using Mozilla Firefox Mozilla Firefox 3.0.16 on Windows Windows XP

    salam,
    trims mas artikelny sngt brmnfaat utk newbe kyk sy.
    mas sy mw tany. kok kl ingin liat data yg dishare dr komplinux ke kompwindows gag bs y.
    sy ketik \\ipkomplinux di address bar muncul pesan “interupt parameter.. …. .. .. . .”, padahal test ping 22ny sdh reply.
    tp kl yg dr windows ke linux bs diliat data shareny melalui nautilus.
    mohon pencerahanny y mas wiwin knp bs kyk gtu.
    trimakasi mas.
    kl bole sy mohon tolong kirimin ke email sy file smb.conf -nya y mas. mau liat perbedaan & letak kesalahanny dmn. trimakasi byk smgt smgt mas winarno 😀
    wass,

  3. December 25th, 2009 at 14:05 | #3
    Using Mozilla Firefox Mozilla Firefox 3.0.16 on Windows Windows XP

    waduddudududu. maaf maf double post. hehehehh 😀

  4. datuck
    December 31st, 2009 at 14:48 | #4
    Using Mozilla Firefox Mozilla Firefox 2.0.0.12 on Windows Windows XP

    wah mas akhirny saya bs jg setelah melewatiny dgn susah payah. ahe ahe. terimakasih mas. izin postingannya saya pakai bwt referensi blog saya y. hehe makasi. salam knl.

  5. Steph
    March 8th, 2010 at 09:49 | #5
    Using Mozilla Firefox Mozilla Firefox 3.0.18 on Windows Windows XP

    Terimakasih sekali atas artikelnya, saya sedang membutuhkan dan ketemu di sini.
    Dan semua berhasil

  6. May 6th, 2010 at 15:53 | #6
    Using Mozilla Firefox Mozilla Firefox 3.5.9 on Windows Windows XP

    thx bgt buat tutorialnya mas

  7. May 6th, 2010 at 15:56 | #7
    Using Mozilla Firefox Mozilla Firefox 3.5.2 on Windows Windows XP

    @ardianz : sama sama.

  8. June 17th, 2010 at 17:26 | #8
    Using Mozilla Firefox Mozilla Firefox 3.6.3 on Windows Windows XP

    @datuck
    kalo itu mungkin perlu di edit di bagian smb.conf

    netbios name = namanyakoputer

    kemudian restart samba/
    mungkin cara jelas bisa dilihat di sini
    http://diazscript.wordpress.com/2010/06/14/netbios-name-ubuntuserver/
    terimakasie

  1. No trackbacks yet.

*

Bad Behavior has blocked 1478 access attempts in the last 7 days.