2012年1月15日 星期日

Install Samba on FreeBSD 8.2


root@bmw0 [/root] # cd /usr/ports/net/samba36; make install clean

Edit smb.conf

root@bmw0 [/root] # vi /usr/local/etc/smb.conf
security = user
hosts allow = 192.168.100. 192.168.200.168 127.

[syncdb]
comment = hmm
path = /usr/local/www/apache22/data/syncdb
valid users = sambauser
public = no
writable = yes
printable = no
create mask = 0640
; write list = @staff

Add a user called "sambauser"
root@bmw0 [/root] # adduser

Adding users to samba
root@bmw0 [/root] # smbpasswd –a
or
root@bmw0 [/root] # /usr/local/bin/pdbedit -a username

Start Samba
root@bmw0 [/root] # /usr/local/etc/rc.d/samba start

Check to see if samba is running
root@bmw0 [/root] # ps -auwxx | egrep '[sn]mbd'

Test samba using smbclient
root@bmw0 [/root] # /usr/local/bin/smbclient -U username \\\\localhost\\username
or
root@bmw0 [/root] # /usr/local/bin/smbclient -U username //localhost/username

Edit rc.conf
root@bmw0 [/root] # vi /etc/rc.conf
### Samba
samba_enable="YES"
nmbd_enable="YES"
smbd_enable="YES"

Edit ipfw.rules
root@bmw0 [/root] # vi /usr/local/etc/ipfw.rules
### samba
$IPF 260 allow tcp from 192.168.100.0/24 to any 139 in

Refernce To:http://gala4th.blogspot.com/2012/01/install-samba-on-freebsd-82.html

沒有留言:

張貼留言