Summary
Sub-menu: /ip smb
Packages required: system
SMB 1.0 server provides file sharing access to configured folders of the router.
RouterOS only supports SMB v1.0 and v2.002
Server settings
Property | Description |
---|---|
allow-guests (yes | no; Default: yes) | Whether the SMB guest user is allowed to access created shares |
comment (string; Default: MikrotikSMB) | Set comment for the server |
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 configuring share names and directories that will be accessible by SMB.
If the directory provided in the configuration does not exist it will be created automatically.
Property | Description |
---|---|
comment (string; Default: default share) | Set a comment for the share |
disabled (yes | no; Default: no) | If disabled, the share will not be accessible. |
max-sessions (number; Default: 10) | How many SMB simultaneous connections are allowed to a 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 user
Set up users that can access SMB shares of the router.
Property | Description |
---|---|
comment (string; Default: ) | Set description for the user |
disabled (yes | no; Default: no) | Defines whether the user is enabled or disabled |
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 the user has only read-only rights when accessing shares or full access rights. |
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:
[admin@MikroTik] /ip smb> print enabled: yes domain: MSHOME comment: MikrotikSMB allow-guests: yes interfaces: all
- SMB user settings:
[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:
[admin@MikroTik] /ip smb> share 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.