• February 24, 2025, 02:30:51 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: [1] 2

Author Topic: Make dns320 the master browser  (Read 23536 times)

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Make dns320 the master browser
« on: February 07, 2012, 09:49:29 AM »

hey all

im having problems with making my 320 the master browser on my network

im running debian squeeze that came from the dlink ftp. After i ssh into root, and look at the smb.conf file in /etc/samba/, i can see straight away that local master= no

after editing this with nano to yes, adding the lines domain master = yes and prefered master = yes and saving the file i restart my nas drive. This is where i have the problem, looking at the smb.conf file after a reboot, my changes have been overwritten back to the default settings

how can i go about making these changes permenant?

Also how can i manually restart samba to test if what i have edited works, ive tried:
       service smb restart - doesnt work as there is no reference to a samba script in the init.d folder??
       /usr/bin/smb restart - same as above
       /usr/sbin/smb restart - same again

wish dlink would add more options to there firmware!

can anyone help??
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #1 on: February 08, 2012, 12:31:28 AM »

You can't edit file(s) in /etc directly as it's residing on the RAM and will be lost when the NAS reboot.

One simple solution is to create a copy from /etc/samba and save it somewhere on the HD. Edit this copy and re-copy back whenever the NAS boot-up. You can made use fun_plug.local located in /ffp/etc for this purpose.

I tested it out and work as expected but the question is how does one determine if the NAS has indeed become the Master Browser!
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #2 on: February 08, 2012, 01:47:44 AM »

Yes that is what I am aiming to do, but it would require a restart of the samba service to make my changes come into affect wouldn't it, or can we make the changes before the samba service starts?

To see if the 320 is the master browser you can use a windows program called LANscanner,  http://scottiestech.info/2009/02/14/how-to-determine-the-master-browser-in-a-windows-workgroup/
 It will tell u who the master is on your network

If you got it working can you make some step by step instructions on what you did?
« Last Edit: February 08, 2012, 01:51:32 AM by Moley85 »
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #3 on: February 08, 2012, 03:45:31 AM »

I have tried the program you mentioned before I posted my earlier reply and output is still the same, ie. my PC is still the Master Browser (MB), before/after the changes to smb.conf.

At the moment, I have no idea how the MB role work on samba so it's hard to determine the exact cause. BTW, why do you need the DNS-320 to be the MB?
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #4 on: February 08, 2012, 04:22:18 AM »

I'm using an atv2 with xbmc on it

I am unable to add the nas drive as a source unless my pc is on (takes the role of master browser), as the nas is defaulted to never be the master browser, and doesnt have an option to take on the role (which is really odd compared to other nas drives) if I have my pc switched off I cannot browse the nas drive without constantly typing out the device name or it's IP address.

All this wouldn't be a problem if the nas was the master browser, as my pc is hardly on anymore, we're as the nas is on 24/7. It makes sense in my case for the nas to be the master browser
Logged

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #5 on: February 08, 2012, 04:59:06 AM »

The problem will be that the samba service is loaded up before you have copied over your changes, so it's using the old smb.conf

If we can restart the samba service after the change, or manage to copy the changed smb.conf file before the service starts then were onto a winner
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #6 on: February 08, 2012, 05:35:04 AM »

I did restart smb process using the edited copy and result still the same. Maybe I should power off my PC after that I see if it made a difference.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #7 on: February 08, 2012, 07:21:31 AM »

Can you tell me the command u used to restart samba?

Turn everything off, then Power on slow time everything starting with the nas first
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #8 on: February 08, 2012, 07:25:38 AM »

Okay, managed to get it to work.

Changes made to smb.conf save it somewhere on the HD.
Code: [Select]
local master = yes
prefered master = yes

Create or edit /ffp/etc/fun_plug.local and add the following:
Code: [Select]
cp <location of edited smb.conf> /etc/samba
smb restart

The only disadvantage of this solution is that every time you made changes under Account Management you need to made a new copy from original source (/etc/samba/smb.conf) and edit it.

Hope this help.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #9 on: February 08, 2012, 08:10:20 AM »

You sir are my hero! Thanks very much!

just gonna test it out now, only other thing is that im using debian squeeze, does it still reference to the ffp folder?

edit: "smb restart" doesnt work, comes up "-bash: smb: command not found"
« Last Edit: February 08, 2012, 08:19:03 AM by Moley85 »
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #10 on: February 08, 2012, 08:30:23 AM »

If you have "install" debian squeeze, you must already have FFP installed. You should be using either telnet or ssh (started from FFP) to remote into your NAS and not into debian chroot environment.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #11 on: February 08, 2012, 08:36:56 AM »

ok so if i change the "fun_plug" file from debian squeeze to using fonz fun_plug?

will that mean that debian will not be booted? as i run all my python scripts from debian?
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #12 on: February 08, 2012, 08:48:02 AM »

Please post only the changes made to fun_plug and other related file(s) if any with regard to debian.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

Moley85

  • Level 1 Member
  • *
  • Posts: 15
Re: Make dns320 the master browser
« Reply #13 on: February 08, 2012, 08:52:37 AM »

to boot debian i have to use the fun_plug dlink supplied with their version of debian squeeze:

Code: [Select]
#!/bin/sh

# Root DISK1
export DISK1=/mnt/HD/HD_a2
export DISTDIR=squeeze

cd $DISK1

mount --bind $DISK1 $DISTDIR$DISK1
mount --bind / $DISTDIR/mnt/root
mount --bind /dev $DISTDIR/dev
mount --bind /sys  $DISTDIR/sys
#mount --bind /sys/crfs $DISTDIR/sys/crfs
#mount --bind /web $DISTDIR/web
mount --bind /proc $DISTDIR/proc

cp -f /proc/mounts $DISTDIR/etc/mtab
rm -f $DISTDIR/etc/fstab
touch $DISTDIR/etc/fstab
cp -f /etc/resolv.conf $DISTDIR/etc
hostname >$DISTDIR/etc/hostname
cp -f /etc/hosts $DISTDIR/etc

$DISK1/$DISTDIR/boot/chroot $DISK1/$DISTDIR /boot/linuxrc




heres my linuxrc file

Code: [Select]
#!/bin/sh

#export PATH="/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"

export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
export ETCDIR="/etc"
export SBINDIR="/sbin"
export HOME="/root"
export BINDIR="/bin"
export SHELL="/bin/bash"
export DATADIR="/usr/share"
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"

#SYSLOG
/etc/init.d/sysklogd start
/etc/init.d/klogd start
 
# DEVFS (This is only needed for sarge)
#/etc/init.d/devfsd start
 
 
#Makedev
#/etc/init.d/makedev start
 
# PTYs
cd dev
MAKEDEV ptyp
 
# NFS (You need to have portmap and nfs-user-server installed)
#/etc/init.d/portmap start
#/etc/init.d/nfs-common start
#/etc/init.d/nfs-user-server start
 
# Mail (You need to have exim4 installed)
#/etc/init.d/exim4 start
 
# CRON
/etc/init.d/atd start
/etc/init.d/cron start
 
# INETD (This is only available in sarge)
#/etc/init.d/inetd start
 
# Remove no login (For etch you need to add "start" at the end of the line)
/etc/init.d/rmnologin start
 
#SSH (You need to have openssh-server installed)
/etc/init.d/ssh start >/var/log/ssh.log 2>&1
 
# STOP BOOTLOG (For etch you need to add "start" at the end of the line)
/etc/init.d/stop-bootlogd start
/etc/init.d/mysql start
apache2ctl start

# START SickBeard & CouchPotato
/etc/init.d/mediaservers.sh

# START SABnzbd
/etc/init.d/sabnzbd start

« Last Edit: February 08, 2012, 09:03:51 AM by Moley85 »
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: Make dns320 the master browser
« Reply #14 on: February 08, 2012, 09:02:50 AM »

Now I understand, basically you have been working within debian chroot environment all this while and FFP is not install. In order to have access to the native environment, FFP is needed because it provide telnet/ssh access. Actually, you can create a script to start debian automatically or manually. Normally I start debian manually mainly because most of the stuff needed is already available in FFP or Optware.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]
Pages: [1] 2