SAMBA FOLDER SHARING FOR OPEN WRT
alternative router with openwrt
if you can build opwrt in mr3420 and can create login spot, Sharing internet, MP3 Player for your own, maybe you need share your colection file or multimedia file from and via your router. if you mix your data file and multimedia in system of openwrt space in your router can be full and maybe your router can runing normal.
solution for this case you must put and save your file and multimedia file in diperent partition in your router in my case i put my file and my multimedia file in sda1 (15 gb) but maybe your partition(sda1) can be explore from your router to everyone
ok you must create samba server in your router and set samba server to sda1 ( if you succes your router adding 1 function again the name is NAS (network storage atachment)
ok you needs packet file .ipk for samba, packet can download in folder samba in :
https://app.box.com/s/k3ieh4uwn2getgur2wje
download folder samba.rar extrct to your pc.
open up winscp application copy *.ipk from folder samba to your router and put in /tmp
open up putty application
typing in putty aplication
root@openwrt~#
root@openwrt~#cd /tm
root@openwrt~#tmp/ opkg install *.ipk
wait untill all packet copied
back again to winscp aplication
you must find folder /etc/config/
than edit your firewall
edit "/etc/config/firewall" add list scrift with
***************************************
config rule
option src lan
option proto udp
option dest_port 137-138
option target ACCEPT
config rule
option src lan
option proto tcp
option dest_port 139
option target ACCEPT
config rule
option src lan
option proto tcp
option dest_port 445
option target ACCEPT
****************************************
than you must find folder /etc/samba/
and edit file smb.conf.template
edit "/etc/samba/smb.conf.template", like this :
*******************************************
[global]
netbios name = |NAME|
workgroup = |WORKGROUP|
server string = |DESCRIPTION|
syslog = 10
encrypt passwords = true
passdb backend = smbpasswd
obey pam restrictions = yes
socket options = TCP_NODELAY
unix charset = ISO-8859-1
local master = yes
preferred master = yes
os level = 20
security = share
guest account = nobody
invalid users = root
smb passwd file = /etc/samba/smbpasswd
******************************************
than you must find folder /etc/config/
and edit file samba with add this scrift above under scrift
addscrift in file "/etc/config/samba" :
*******************************************
config 'samba'
option 'name' 'openwrt'
option 'description' 'openwrt'
option 'workgroup' 'WORKGROUP'
config 'sambashare'
option 'read_only' 'no'
option 'create_mask' '0700'
option 'dir_mask' '0700'
option 'name' 'samba'
option 'path' '/mnt/sda1' <==== similiar with partition in your router
option 'guest_ok' 'yes'
****************************************************
than you must find folder /etc
add list scrift, (don't delete just add above) in "/etc/rc.local" :
****************************************************
smbd -D
nmbd -D
exit 0
*********************************************************
than back again to putty aplication
typing this scrift
root@openwrt~#
root@openwrt~# /etc/init.d/samba enable
root@openwrt~# /etc/init.d/samba start
because my partition in sda1 is ntfs
we must execution this command
root@openwrt~# umount /dev/sda1
root@openwrt~# ntfs-3g /dev/sda1 /mnt/sda1
restart your router.
back to your PC
in windows xp/7 in RUN typing "cmd" ,(DOS) than ENTER, typing this command :
***************************************
net use S: \\192.168.1.1\samba
*****************************************
FINISH !!!
now you can akses in your computer (win7) or (win XP)"
maping for your folder sharing : samba
you can create folder in samba : /media/music
/media/video
/media/picture
/media/pdf
for management your NAS
done