Selamat Datang Orang Gila !!! .:: Welcome Lunatic ::.

Install Samba

1) Install samba dar port!

freebsd $ cd /usr/ports/net/samba
freebsd $ make install

silahkan check di /usr/local/share/doc/samba!!

Sekarang kita akan membuat direktori untuk sharenya:

freebsd $ mkdir /usr/smbshares/directories
freebsd $ chmod 0775 /usr/smbshares/directory
freebsd $ chown owner:group /usr/smbshares/directory

drwxr-xr-x root wheel /usr/smbshares
drwxrwxr-x root eng seceng
drwxrwxr-x root gimp gimpfiles

Membuat file lock dan logging :

freebsd $ mkdir /usr/local/locks
freebsd $ mkdir /var/log/samba

copykan /usr/ports/net/samba/work/samba-2.0.x/examples/smb.conf.default ke
/ usr/local/etc/smb.conf dan rdit file smb.conf tersebut

#Global Parameters
[global]
workgroup = wrkgrpname
server string = Samba
interfaces = 192.168.32.1/28 (variable)
security = SHARE
encrypt passwords = YES
password level = 2
username level = 2
log file = /path to logfile specified above
max log size = 50 (default)
lock dir = /lock dir specified earlier
guest account = pcguest
[tmp]
comment = (your coments here)
path = /usr/tmp
read only = No
directory mask = 0775
guest ok = yes
browseable = No

untuk menjalankan samba kita lakukan dengan perintah :


freebsd $ /usr/local/sbin/smbd -D
freebsd $ /usr/local/sbin/nmbd -D

Sekarang kita membuat user supaya client kita dapat menyimpan file di samba

bash$>cd /usr/local/private
bash$>mv smbpasswd smbpasswd.orig
bash$>touch smbpasswd
bash$>chmod 0600 smbpasswd
bash$>/usr/local/bin/smbpasswd -a (username)

bikin file /usr/local/etc/rc.d/samba.sh:

#!/bin/sh
smbspool=/var/spool/samba
pidfiledir=/var/run
echo -n 'smbd'
/usr/local/sbin/smbd -D
echo -n 'nmbd'
/usr/local/sbin/nmbd -D

bila anda ingin ngeset samba lewat web anda bisa installkan SWAT

Pertama edit /etc/services tambahkan

swat 901/tcp #Samba web admin tool.

Kedua edit /etc/inetd.conf


#Samba web admin tool
swat stream tcp nowait.400 root /usr/local/sbin/swat swat

sekarang kita test dengan browser ke http://localhost:901

dan login sebagai root

Menurut anda tentang blog ini?