Yessss. Asik dapet ilmu baru ni. Langsung mw share ah. Sdikit cerita gara2 percboaan ini ubuntu saya kena install ulang lho. haha gara2 sy gak tw2 ngapus file2 samba yg ud satu paket(nempel) kl kita lagi nginstall ubuntu. Ahe ahe. bsk langsunglah spontan cerita dikampus dan hasilny diktawain disukurin. Ah gembel niatny mw nanya2 jg. Haha. Nah langsung kmbli keleptop aj y. saya mw jelasin dulu ni buat yg pada blm tw samba itu apa. Kl yg saya alami samba merupakan protocol jaringan untuk mengkoneksikan antar platform sehingga bisa saling berkomunikasi, bertukar data, dll.
Jd intinya samba itu jembatanlah (buat master2 sry y kl sotoy salah benerin ajj yak hehe newbe maklum). Nah jadi hubungannya dgn postingan ini saya mw bikin jaringan pear to pear dgn berbeda system operasi, yang satu make ubuntu 8.04 yang satu lg windows xp. Biar enak +gampang coba langkah2 dibawah ajj OK:

1. Pastikan kedua computer sudah terhubung (artinya jika kita ping dengan masing2 IP sudah REPLY tidak RTO). [Contoh disini saya pakai IP di ubuntu 192.168.0.1 dan yg di windows 192.168.0.5]

2. Download paket2 samba yg dibutuhkan :
a. libsmbclient (libsmbclient_3.0.28a-1ubuntu4.9_i386.deb)
b. samba-common (samba-common_3.0.28a-1ubuntu4.9_i386.deb)
c. smbclient (smbclient_3.0.28a-1ubuntu4.9_i386.deb)
d. smbfs (smbfs_3.0.28a-1ubuntu4.9_i386.deb)
e. samba (samba_3.0.28a-1ubuntu4.9_i386.deb)

3. install yg sudah didownload tadi : (oiy sbelum install biar enak masuk sebagai super user dulu y di terminalnya)

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

Processing triggers for libc6 …
ldconfig deferred processing now taking place

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

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

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

e. Install samba
root@andylinux:/samba# dpkg -i samba_3.0.28a-1ubuntu4.9_i386.deb
Selecting previously deselected package samba.
(Reading database … 95767 files and directories currently installed.)
Unpacking samba (from samba_3.0.28a-1ubuntu4.9_i386.deb) …
Setting up samba (3.0.28a-1ubuntu4.9) …
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

f. Langkah installasi paket samba sudah selesai sekarang saatnya mengkonfigurasi file smb.conf yg ada di direktori /etc/samba/

4. Pertama–tama sebelum mengedit-ngedit file smb.conf tidak salahnya kita backup dulu file smb.conf nya
root@andylinux:/samba# cp /etc/samba/smb.conf /etc/samba/smb.conf.backup

5. edit file smb.conf dgn editor kesukaan kita. Contoh :
root@andylinux:/samba# pico /etc/samba/smb.conf

setelah itu akan keluar file smb.conf di editor. lalu cari dibagian [global]
workgroup = WORKGROUP
kemudian ganti dengan seperti dbwh ini (dibagian workgroup sesuaikan dgn workgroup kita, contoh dibawah saya menamakannya MSHOME)
workgroup = MSHOME

setelah itu cari lagi dibagian ### Networking ###
; interfaces = 127.0.0.0/8 eth0
; bind interfaces only = true
Hapus tanda ; seperti dibawah ini
interfaces = 127.0.0.0/8 eth0
bind interfaces only = true

setelah itu cari lagi dibagian ##### Authentication #####
; security = user
; guest account = nobody
Ubah dan hapus tanda ; menjadi
security = share
guest account = nobody

terakhir untuk mencoba data yg ingin kita share tambahkan perintah ini dan letakkan dipaling bawah file smb.conf
[cobashare]
comment = coba aja
path = /home/andy/Documents
browseabale = yes
read only = yes
guest ok = yes
create mask = 0600
directory mask = 0700

sampai disini tahap mengkonfigurasi file smb.conf sudah selesai. Lalu keluarlah dari editor dan jangan lupa di save.

6. Sekarang kita coba mengetest file smb.conf yg sudah kita edit tadi. Ketik printah ini

root@andylinux:/samba# testparm
Load smb config files from /etc/samba/smb.conf
Processing section “[printers]”
Processing section “[print$]”
Processing section “[cobashare]”
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
workgroup = MSHOME
server string = %h server (Samba, Ubuntu)
interfaces = 127.0.0.0/8, eth0
bind interfaces only = Yes
security = SHARE
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

[cobashare]
comment = coba aja
path = /home/andy/Documents
create mask = 0600
directory mask = 0700
guest ok = Yes

7. Setelah itu jalankan deamon samba nya
root@andylinux:/samba# /etc/init.d/samba start
* Starting Samba daemons
[ OK ]

8. Matikan deamon samba nya
root@andylinux:/samba# /etc/init.d/samba stop
* Stopping Samba daemons
[ OK ]

9. Restart kembali deamonnya
root@andylinux:/samba# /etc/init.d/samba restart
* Stopping Samba daemons [ OK ]
* Starting Samba daemons [ OK ]

10. OK samba sudah selesai dan siap dipakai.

11. Sekarang untuk melihat file yg dishare oleh computer linux caranya buka windows explorer ketikan \\ipaddress komputer linux di address bar windows. Contoh dipostingan ini adalah \\192.168.0.1

Kalo kita mw nambahin share data dari linux tinggal pilih folder yg mw dishare, lalu klik kanan pilih Saring Options, dan berikan centang ketiga opsi, lalu Create Share. Selanjutny folder tersebut akan tersharing di computer windows.

12. Nah kalo kita mw ngeliat share data yg dari windows caranya pertama pilih folder yg ingin dishare klik kanan properties klik tab sharing, kasih centang di Share this folder in network kasih nama Share name, misal disini saya kasi nama source. Klik OK

Skrg dilinux kitaharus mounting folder yg dishare oleh windows caranya
smbmount //IP_ADDRESS_WINDOWS/NAMA_FOLDERNYA /DIREKTORI_LINUX.
Contoh :
root@andylinux:/samba# smbmount //192.168.0.5/source /mnt
Password:
Masukin passwordnya setelah itu browse dgn nautilus.

13. Dan akhriny selesai postinganny. Smg jelas dan bermanfaat.