TechInfoDepot:DD-WRT/HDsamba2 update to samba3

From TechInfoDepot
Jump to navigationJump to search
Source

Update a HDsamba2 installation from using Samba2 to using Samba3

Please note: That it may be very importent that you have swap running, or Samba3 is very likely to run out of memory.

Loosely based on D13H4rdNL's original Update Tutorial which can be found here


Manual update steps

I'm assuming the router is on 192.168.1.1

I'm assuming you have used the v3install.HDsamba2 script to install samba.

The smb.conf below is for an open SHARE (no password authentication required)


This has been tested on:

  • DD-WRT v24-sp2 (07/10/09) mega - build 12476M NEWD Eko on a WRT610N (no V1), CFE .16/7.

Using client machines:

  • XP Professional/32 and
  • Vista Ultimate/64


If its been a while since you installed HDsamba2 you should first update the Optware list

ipkg-opt update

Check that you have BusyBox v1.13.4 installed. BusyBox seems to have ammended code to support Long File Sizes (I haven't tested it without BusyBox). The version is displayed immedeatly following your password input when you log in to the router. Else:

ipkg-opt install busybox

Make a copy of smb.conf file and S80samba

cp /opt/etc/samba/smb.conf /opt/etc/samba/smb.conf.2.backup
cp /opt/etc/init.d/S80samba /opt/etc/init.d/S80samba.backup


Remove samba 2.2.12 and install samba 3.2.13

ipkg-opt remove samba2 
ipkg-opt install samba


Copy smb.conf and S80samba back

cp /opt/etc/samba/smb.conf.2.backup /opt/etc/samba/smb.conf
cp /opt/etc/init.d/S80samba.backup /opt/etc/init.d/S80samba

Add the following line to smb.conf in the section [global]:

interfaces = 192.168.1.1/24

I used testparm to test smb.conf:

testparm /mnt/opt/etc/samba/smb.conf

Result should look something like this:

Processing section "[data]" 
Module '/opt/lib/charset/CP850.so' loaded 
Loaded services file OK. 
Server role: ROLE_STANDALONE 
Press enter to see a dump of your service definitions 

[global] 
workgroup = MSHOME 
netbios name = USBDISK 
server string = USBDISK 
interfaces = 192.168.1.1/24 
security = SHARE 
map to guest = Bad User 
log file = /opt/var/log/samba/samba_log.%m 
max log size = 100 
name resolve order = wins hosts lmhosts bcast 
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 
load printers = No 
dns proxy = No 
wins support = Yes 
remote announce = 192.168.1.255 
hosts allow = 192.168.1.0/24 

[data] 
path = /mnt/data/ 
force user = root 
read only = No 
inherit permissions = Yes 
inherit acls = Yes 
guest ok = Yes

You can proceed if there are no error messages, otherwise you have to resolve those first.


List shares on windows machine or samba server to test if interfaces are working:

smbclient -L 192.168.1.1


There is a new /opt/etc/init.d/S08samba created. It can be be deleted

rm  /opt/etc/init.d/S08samba 

Now run the S80samba script to start Samba3

sh /opt/etc/init.d/S80samba 

and run ps to verify that the daemons have started:

17057 root 6536 S /opt/sbin/nmbd -D 
17059 root 11020 S /opt/sbin/smbd -D 
17060 root 11012 S /opt/sbin/smbd -D


Run smbd -V to check version:

root@WikiDevi:DD-WRT//mnt/opt/etc/samba# smbd -V 
Version 3.2.13