Samba filesystem

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:07, 31 August 2006 (edit)
MarcAntoineRuel (Talk | contribs)

← Previous diff
Revision as of 00:40, 1 September 2006 (edit) (undo)
AlReece45 (Talk | contribs)

Next diff →
Line 1: Line 1:
==Introduction== ==Introduction==
-One of the things you might miss on the router, is writable storage. Well, if you run a Linux samba or Windows server on your LAN, the Samba filesystem provides a convenient solution! It adds a vast amount of writable storage to your router and even offers an automatic startup script.+ 
 +One of the things you might miss on the router, is writable storage. Well, if you run a Linux samba or Windows server on your LAN, the Samba file system provides a convenient solution! It adds a vast amount of writable storage to your router and even offers an automatic startup script.
==Instructions== ==Instructions==
-First create a network share on the Linux or Windows server.+ 
-<br/><br/>+# Create a SMB network share on the host computer.
-Linux users will utilize samba for this. Linux users now need to set up permissions for the share, [http://samba.org/samba/docs/man/Samba-HOWTO-Collection/ see the howto for more].+ 
-<br/><br/>+* On Linux, use [http://samba.org/ Samba] to create a SMB network share. [http://samba.org/samba/docs/man/Samba-HOWTO-Collection/ HOWTO]
-Windows users will use the native file sharing functionality. Windows users can also set the permissions as they see fit. This includes verifying that the share permission is set to read/write AND that the NTFS permission is at least read/write.+* On Windows, this is the default file sharing system. Simply right click and select "Sharing and Security" to set up sharing.
-<br/><br/> + 
-Next, configure samba on the router. You can configure Samba via the Web Interface, to do so navigate to '''Administration''', find the '''Samba FS Automount''' option and enable it.+# Use the [Web_Interface] and go to the '''Administration''' tab.
-* Enter the share location in the 'share' field, eg: ''//192.168.1.160/myshare'' .+# Enable the '''Samba FS Automount''' option. If new options do not appear the "Save Changes" and go back to the page.
-* In 'user' and 'password' enter the logon credentials of a user allowed to access the share.+# Enter the share location in the 'share' field. eg: ''//192.168.1.160/myshare''
-* Optionally you may enter a Startscript. For example if you have a script on your sambashare ''\\lanserver\myshare\startup.sh'' you enter ''startup.sh'' in the 'Startscript' box. This script (''/tmp/smbshare/startup.sh'' on the router) will be executed when the router mounts your share on boot.+# In 'user' and 'password' enter the user credentials of a user allowed to access the share.
 +# You may optionally enter a Startscript. For example if you have a script on your share ''\\lanserver\myshare\startup.sh'' you enter ''startup.sh'' in the 'Startscript' box. This script (''/tmp/smbshare/startup.sh'' on the router) will be executed when the router mounts your share on boot.
 + 
You can see sample of startup script on [[Jffs]] page. You can see sample of startup script on [[Jffs]] page.
-==Advanced==+== Advanced ==
-You may want to manually mount a share. To do this, simply enter this command in a [[Telnet/SSH and the Command Line|Telnet or SSH prompt]] :+ 
 +You may want to manually mount a share. To do this, simply enter this command in a [[Telnet/SSH and the Command Line|Telnet or SSH prompt]]:
 + 
* ''/tmp/Path/'' is the path you want it mounted * ''/tmp/Path/'' is the path you want it mounted
* Don't forget that only /tmp/, /dev/ and potentially /jffs/ are writeable! * Don't forget that only /tmp/, /dev/ and potentially /jffs/ are writeable!
Line 23: Line 28:
Receiving errors like this seems normal: Receiving errors like this seems normal:
- load_client_codepage: filename /usr/lib/codepages/codepage.850 does not exist.+ 
- load_unicode_map: filename /usr/lib/codepages/unicode_map.850 does not exist.+ load_client_codepage: filename /usr/lib/codepages/codepage.850 does not exist.
- session request to 192.168.1.99 failed+ load_unicode_map: filename /usr/lib/codepages/unicode_map.850 does not exist.
- Can't get /etc/mtab~ lock filesmbmnt failed: 1+ session request to 192.168.1.99 failed
 + Can't get /etc/mtab~ lock filesmbmnt failed: 1
To unmount a share, enter this command in a shell prompt: To unmount a share, enter this command in a shell prompt:
- umount /tmp/Path/ 
- rmdir /tmp/Path/ 
-===Note for Windows users===+ umount /tmp/Path/
 + rmdir /tmp/Path/
 + 
 +== Note for Windows users ==
 + 
Especially on Windows Server 2003, assert that your server accepts NTLM v1. Especially on Windows Server 2003, assert that your server accepts NTLM v1.
-To verify, Do Start Menu / Run / Type "gpedit.msc"+ 
-Then go in Computer Configuration / Windows Settings / Security Settings / Local Policies / Security Options.+# Goto Start > Run
-Verify that "Network security: LAN Manager authentication level" is '''NOT''' "Send NTLMv2 response only\refuse LM & NTLM"+# Type "gpedit.msc" and push enter.
 +# Goto Computer Configuration / Windows Settings / Security Settings / Local Policies / Security Options.
 +# Verify that "Network security: LAN Manager authentication level" is '''NOT''' "Send NTLMv2 response only\refuse LM & NTLM"
 + 
[[Category:basic HOWTO]] [[Category:basic HOWTO]]
[[Category:English documentation]] [[Category:English documentation]]

Revision as of 00:40, 1 September 2006

Contents

Introduction

One of the things you might miss on the router, is writable storage. Well, if you run a Linux samba or Windows server on your LAN, the Samba file system provides a convenient solution! It adds a vast amount of writable storage to your router and even offers an automatic startup script.

Instructions

  1. Create a SMB network share on the host computer.
  • On Linux, use Samba to create a SMB network share. HOWTO
  • On Windows, this is the default file sharing system. Simply right click and select "Sharing and Security" to set up sharing.
  1. Use the [Web_Interface] and go to the Administration tab.
  2. Enable the Samba FS Automount option. If new options do not appear the "Save Changes" and go back to the page.
  3. Enter the share location in the 'share' field. eg: //192.168.1.160/myshare
  4. In 'user' and 'password' enter the user credentials of a user allowed to access the share.
  5. You may optionally enter a Startscript. For example if you have a script on your share \\lanserver\myshare\startup.sh you enter startup.sh in the 'Startscript' box. This script (/tmp/smbshare/startup.sh on the router) will be executed when the router mounts your share on boot.

You can see sample of startup script on Jffs page.

Advanced

You may want to manually mount a share. To do this, simply enter this command in a Telnet or SSH prompt:

  • /tmp/Path/ is the path you want it mounted
  • Don't forget that only /tmp/, /dev/ and potentially /jffs/ are writeable!
mkdir /tmp/Path/
smbmount //<IP.SE.RV.ER>/Share /tmp/Path/ -o username=<user>,password=<password_user>

Receiving errors like this seems normal:

 load_client_codepage: filename /usr/lib/codepages/codepage.850 does not exist.
 load_unicode_map: filename /usr/lib/codepages/unicode_map.850 does not exist.
 session request to 192.168.1.99 failed
 Can't get /etc/mtab~ lock filesmbmnt failed: 1

To unmount a share, enter this command in a shell prompt:

 umount /tmp/Path/
 rmdir /tmp/Path/

Note for Windows users

Especially on Windows Server 2003, assert that your server accepts NTLM v1.

  1. Goto Start > Run
  2. Type "gpedit.msc" and push enter.
  3. Goto Computer Configuration / Windows Settings / Security Settings / Local Policies / Security Options.
  4. Verify that "Network security: LAN Manager authentication level" is NOT "Send NTLMv2 response only\refuse LM & NTLM"