NMT:Samba

From Lundman Wiki
Jump to: navigation, search

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
}