NMT:Samba: Difference between revisions

From Lundman Wiki
mNo edit summary
No edit summary
Line 4: Line 4:


           [Share]
           [Share]
           '''path = /opt/sybhttpd/localhost.drives/'''
           '''path = /opt/sybhttpd/localhost.drives'''


Start and Stop Samba to see the effect, however you may need a reboot.
Start and Stop Samba to see the effect, however you may need a reboot.
Line 11: Line 11:


If your drive is formatted with a linux extended file system, you may need to adjust your permissions accordingly to allow write access.
If your drive is formatted with a linux extended file system, you may need to adjust your permissions accordingly to allow write access.
==Newer versions==
A recent upgrade reveals that this method no longer works, as the smb.conf configuration file is now created dynamically on startup.
To fix this, telnet into the box and copy to the /mnt/syb8634/etc/smb.sh file to a download directory and edit the following section as below
start() {
        if [ -e /mnt/syb8634/bin/nmt_services.cgi ]; then
                echo Updating samba workgroup...
                smbworkgrp=`pflash get workgroup`
                /mnt/syb8634/bin/nmt_services.cgi cmd=smb_workgrp opt=${smbworkg
        fi
        passwd
        echo 'path = /opt/sybhttpd/localhost.drives' >> /etc/samba/lib/smb.conf
        if [ -e /mnt/syb8634/bin/nmbd ]; then
                if [ -e /mnt/syb8634/bin/smbd ]; then
                        echo -n "Starting samba"
                /mnt/syb8634/bin/nmbd -D
                        /mnt/syb8634/bin/smbd -D
                fi
        fi
}

Revision as of 16:24, 27 November 2010

Easy. Once Telnet access is enabled

Edit /etc/samba/lib/smb.conf and edit the Share section and simply remove the HARD_DRIVE from the path

         [Share]
         path = /opt/sybhttpd/localhost.drives

Start and Stop Samba to see the effect, however you may need a reboot.

You can now mount your USB devices as a network drive in Windows, or share it with your other media streaming devices around the house.

If your drive is formatted with a linux extended file system, you may need to adjust your permissions accordingly to allow write access.

Newer versions

A recent upgrade reveals that this method no longer works, as the smb.conf configuration file is now created dynamically on startup.

To fix this, telnet into the box and copy to the /mnt/syb8634/etc/smb.sh file to a download directory and edit the following section as below

start() {

       if [ -e /mnt/syb8634/bin/nmt_services.cgi ]; then
               echo Updating samba workgroup...
               smbworkgrp=`pflash get workgroup`
               /mnt/syb8634/bin/nmt_services.cgi cmd=smb_workgrp opt=${smbworkg
       fi
       passwd
       echo 'path = /opt/sybhttpd/localhost.drives' >> /etc/samba/lib/smb.conf
       if [ -e /mnt/syb8634/bin/nmbd ]; then
               if [ -e /mnt/syb8634/bin/smbd ]; then
                       echo -n "Starting samba"
               /mnt/syb8634/bin/nmbd -D
                       /mnt/syb8634/bin/smbd -D
               fi
       fi

}