Changing samba location
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 |
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 setup and successfully run Samba on your LAN (using the guest account) and you have some shares already setup in smb.conf. |
| You have created a new user called 'share' using the Adding Users Guide. |
| You have already completed the Samba with Users guide |
Moving samba
First lets kill all samba processes that are active
ps -e kill #
where # is the PID of any samba process running (normally processes containing smbd)
To move your Samba install to /opt/etc/samba , we need to move the configuration file (and or) smbpasswd file. Browse to the location of your current smb.conf file
mkdir -p /opt/etc/samba mv smb.conf /opt/etc/samba
and optionally
mv smbpasswd /opt/etc/samba
Now we need to change the settings in the startup script
nano /opt/etc/init.d/S97Samba
Change your file to the following:
#!/bin/sh /usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
Save and exit
Ctrl + O Ctrl + X
If the directory /opt/var/log does not exist make it
mkdir -p /opt/var/log
And make the log file
touch /opt/var/log/smbd.log
If you are using the smbpasswd file, you need to change smb.conf
nano /opt/etc/samba/smb.conf
change the following line
smb passwd file=/old/location/of/samba/smbpasswd
to
smb passwd file=/opt/etc/samba/smbpasswd
Now start Samba
cd /opt/etc/init.d ./S97Samba
You should be done!
