posted by: Ralf Rottmann | posted @ Saturday, June 16, 2007 9:39 AM | View blog reactions

I am running the open source firmware OpenWrt on my Linksys Wireless Broadband WRT54GL.

In order to get some stats packages working I wanted the router to copy logfiles to a Windows Vista based machine, which I am running as a file server.

Mapping a Windows network share with OpenWrt can be achieved with a view steps:

First you need to install the kmod-cifs package. To do so just run

ipkg install kmod-cifs

The OpenWrt package manager will download the package and execute installation steps.

Next install the module with

insmod cifs

After a reboot (the changes will be persistent) the Windows share can be mapped via:

mount -t cifs //my-pc/share /mnt/point -o unc=\\\\my-pc\\share,ip=192.168.1.100,user=john,pass=doe,dom=workgroup

You have to pass in the ip etc. manually as these go directly to the kernel. Also the Windows network path has to be escaped, hence the 4 x backslash above.

Make sure that you created the mount point via

mkdir /mnt/point

To automatically mount after boot create a startup script which contains the mount command in /etc/init.d:

echo 'mount -t cifs //my-pc/share /mnt/point -o unc=\\\\my-pc\\share,ip=192.168.1.100,user=john,pass=doe,dom=workgroup' > /etc/init.d/S60externalmount

As a last step make the script executable:

chmod +x /etc/init.d/S60externalmount

tags:
comments
No comments posted yet.
post your comment
Title *
Name *
Email
Url
Comment *  
Please add 4 and 1 and type the answer here: