Manual:IP/SMB: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
m (→‎Example: spacings and bullets)
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<p id="shbox">
<p id="shbox">
<b>Sub-menu:</b> <code>/ip smb</code><br />
<b>Sub-menu:</b> <code>/ip smb</code><br />
<b>Packages required:</b> <code>system</code><br />
</p>
</p>




SMB server provides windows sharing access to configured folders of the router.
SMB 1.0 server provides file sharing access to configured folders of the router.  
 
{{Note|RouterOS only supports SMB v1.0 and v2.002}}


==Server settings==
==Server settings==
Line 13: Line 16:
|desc=Description
|desc=Description
}}
}}
{{Mr-arg-table
{{Mr-arg-table
|arg=enabled
|arg=allow-guests
|type=yes {{!}} no
|type=yes {{!}} no
|default=no
|default=yes
|desc=If SMB service is enabled
|desc=If SMB guest user is allowed to access created shares
}}
 
{{Mr-arg-table
|arg=comment
|type=string
|default=MikrotikSMB
|desc=
}}
}}
{{Mr-arg-table
{{Mr-arg-table
Line 26: Line 37:
}}
}}
{{Mr-arg-table
{{Mr-arg-table
|arg=allow-guests
|arg=enabled
|type=yes {{!}} no
|type=yes {{!}} no
|default=yes
|default=no
|desc=If SMB guest user is allowed to access created shares
|desc=Enable/disable SMB service
}}
}}
{{Mr-arg-table-end
{{Mr-arg-table-end
|arg=interface
|arg=interface
|type=string
|type=string
|default=all
|default=all
|desc=list of interfaces that SMB service is available on.
|desc=List of interfaces on which SMB service will be running.
<var>all</var> - smb will be available on all interfaces.
}}
}}


Line 44: Line 57:




To set up SMB share users have to specify what folders can be accessed by the router. If folder does not exist it will be created automatically for use by created share.
Sub menu allows to configure share names and directories that will be accessible by SMB.
 
If directory provided in configuration does not exist it will be created automatically.




Line 56: Line 71:
|type=yes {{!}} no
|type=yes {{!}} no
|default=no
|default=no
|desc=If SMB share is accessible to any configured SBM user
|desc=If disabled, share will not be accessible.
}}
}}


Line 75: Line 90:
|type=string
|type=string
|default=
|default=
|desc=What folder should be assigned to the SMB share. If left empty value of ''name'' argument will be used from the root folder.
|desc=Directory on router assigned to SMB share. If left empty value of ''name'' argument will be used from the root folder.
}}
}}


Line 168: Line 183:


Now additional configuration changes can be done, like disabling default user and share etc.
Now additional configuration changes can be done, like disabling default user and share etc.
==Unsupported features==
* SMB1 Extended security

Latest revision as of 09:20, 13 February 2019

Summary

Sub-menu: /ip smb
Packages required: system


SMB 1.0 server provides file sharing access to configured folders of the router.

Icon-note.png

Note: RouterOS only supports SMB v1.0 and v2.002


Server settings

Property Description
allow-guests (yes | no; Default: yes) If SMB guest user is allowed to access created shares
comment (string; Default: MikrotikSMB)
domain (string; Default: MSHOME) Name of windows workgroup
enabled (yes | no; Default: no) Enable/disable SMB service
interface (string; Default: all) List of interfaces on which SMB service will be running. all - smb will be available on all interfaces.

Share settings

Sub-menu: /ip smb share


Sub menu allows to configure share names and directories that will be accessible by SMB.

If directory provided in configuration does not exist it will be created automatically.


Property Description
disabled (yes | no; Default: no) If disabled, share will not be accessible.
max-sessions (number; Default: 10) How many SMB simultaneous connections are allowed to shared folder
name (string; Default: ) Name of the SMB share
directory (string; Default: ) Directory on router assigned to SMB share. If left empty value of name argument will be used from the root folder.

User setup

Sub-menu: /ip smb share


Set up users that can access SMB shares of the router.


Property Description
disabled (yes | no; Default: no) If SMB service is enabled
name (string; Default: ) login name of the SMB service user
password (string; Default: ) password for SMB user to connect to SMB service
read-only (yes | no; Default: yes) Sets if user has only read-only rights when accessing shares or full access.

Example

To make some RouterOS folder available through SMB service follow these steps:

  • create user:
/ip smb user add read-only=no name=mtuser password=mtpasswd 
  • add shared folder
/ip smb share add name=backup
  • enable SMB service
/ip smb set enabled=yes

Now check for results:

  • Check general service settings:


/ip smb print


[admin@MikroTik] /ip smb> print 
      enabled: yes
       domain: MSHOME
      comment: MikrotikSMB
 allow-guests: yes
   interfaces: all
  • SMB user settings:
/ip smb users print


[admin@MikroTik] /ip smb> users print 
Flags: * - default, X - disabled 
#    NAME         PASSWORD      READ-ONLY
0 *  guest                      yes 
1    mtuser       mtpasswd      no
  • And finally SMB shares settings:
/ip smb shares print


[admin@MikroTik] /ip smb> shares print

Flags: X - disabled, I - inactive, * - default 
#    NAME                   DIRECTORY        MAX-SESSIONS
0  * ;;; default share
     pub                   /pub              10
1    backup                /backup           10

Now additional configuration changes can be done, like disabling default user and share etc.

Unsupported features

  • SMB1 Extended security