Basic Samba
From WL-HDD Wiki
| WL-HDD Contents |
|---|
| What is the WL-HDD |
| Features |
| Pro's/con's |
| Reviews |
| Hacking |
| Inserting the HDD |
| Hacking Guides |
| Basic setup guides |
| Packages guides |
| Requests |
| Troubleshooting |
| This Wiki |
| Credits |
| Editing help |
| Contact Me |
Contents |
Prerequisites
To complete this guide, the following is assumed:
| You are running Oleg's firmware (1.9.2.7-6b or later) |
| You have harddisk partitions up and running with an extended filesystem mounted to /opt |
| You have installed the Ipkg package system. |
| You have configured your partitions to automount. |
| You have set the hostname of your WL-HDD in the web-interface (IP Config - LAN). |
We do not need to actually install samba as it is included with Oleg's firmware (thanks Oleg!)
However, it does need to be configured.
Configuration
First of all we need to create a configuration folder for samba.
mkdir /opt/etc/samba
Now lets create the configuration file with nano. Paste the following lines into this file- some will need changing, any lines in bold are optional:
cat << eof > /opt/etc/samba/smb.conf [global] workgroup = <your workgroupname e.g. Workgroup> guest account = nobody security = share browseable = yes guest ok = yes guest only = no log level = 1 max log size = 100 encrypt passwords = yes dns proxy = no server string = <Name you want to see in Network Places e.g. asus> [<your 1st sharename e.g. Share1>] path=/opt/share/shared1 writeable = yes browseable = yes [<your 2nd sharename e.g. Share2>] path=/opt/share/shared2 writeable = yes browseable = yes eof
Now lets make the shared directories:
mkdir -p /opt/share/shared1 mkdir -p /opt/share/shared2
Lets give them permissions so that they can be accessed from your PC:
chmod o+rw /opt/share/shared1 chmod o+rw /opt/share/shared1
Feel free to create more shares continuing with the pattern shown here.
Startup
Now lets make the samba init file- this will make samba run when the WL-HDD is switched on or rebooted.
Paste in the following lines:
cat << eof > /opt/etc/init.d/S97Samba #!/bin/sh /usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf eof
Make the init file executable so that it can be run:
chmod +x /opt/etc/init.d/S97Samba
Check it works
Now reboot the router and then list the services running.
ps -e
Samba should feature on the list of services, (look for smb or smbd) You can also use grep (used to find text on linux devices)
ps |grep "smb"
Using Samba
If you are using windows, click start then run. Enter the following into the text box:
\\192.168._._ (ip address of your WL-HDD)
You should get a box like this one:
