|
|
(20 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| {{Versions|2.9, v3, v4, v5+}}
| | The article is moved to our [https://help.mikrotik.com/docs/display/ROS/User new manual!] |
| | |
| | |
| ==Summary==
| |
| <p id="shbox"><b>Sub-menu:</b> <code>/user</code></p>
| |
| | |
| | |
| MikroTik RouterOS router user facility manage the users connecting the router from the local console, via serial terminal, telnet, SSH or Winbox. The users are authenticated using either local database or designated RADIUS server.
| |
| | |
| Each user is assigned to a user group, which denotes the rights of this user. A group policy is a combination of individual policy items.
| |
| | |
| In case the user authentication is performed using RADIUS, the [[RADIUS Client]] should be previously configured.
| |
| | |
| | |
| ==User Groups==
| |
| <p id="shbox"><b>Sub-menu:</b> <code>/user group</code></p>
| |
| | |
| The router user groups provide a convenient way to assign different permissions and access rights to different user classes.
| |
| | |
| | |
| ===Properties===
| |
| | |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=name
| |
| |type=string
| |
| |default=
| |
| |desc=The name of the user group
| |
| }}
| |
| | |
| {{Mr-arg-table-end
| |
| |arg=policy
| |
| |type=local {{!}} telnet {{!}} ssh {{!}} ftp {{!}} reboot {{!}} read {{!}} write {{!}} policy {{!}} test {{!}} web {{!}} sniff {{!}} api {{!}} winbox {{!}} password {{!}} sensitive
| |
| |default=
| |
| |desc=List of allowed policies:
| |
| Login policies:
| |
| * <var>local</var> - policy that grants rights to log in locally via console
| |
| * <var>telnet</var> - policy that grants rights to log in remotely via telnet
| |
| * <var>ssh</var> - policy that grants rights to log in remotely via secure shell protocol
| |
| * <var>web</var> - policy that grants rights to log in remotely via WebBox
| |
| * <var>winbox</var> - policy that grants rights to log in remotely via WinBox and bandwidth test authentication
| |
| * <var>password</var> - policy that grants rights to change the password
| |
| * <var>api</var> - grants rights to access router via API.
| |
| * <var>dude</var> - grants rights to log in to dude server.
| |
| Config Policies:
| |
| * <var>ftp</var> - policy that grants full rights to log in remotely via FTP, to read/write/erase files and to transfer files from/to the router. Should be used together with write policy.
| |
| * <var>reboot</var> - policy that allows rebooting the router
| |
| * <var>read</var> - policy that grants read access to the router's configuration. All console commands that do not alter router's configuration are allowed. Doesn't affect FTP
| |
| * <var>write</var> - policy that grants write access to the router's configuration, except for user management. This policy does not allow to read the configuration, so make sure to enable read policy as well
| |
| * <var>policy</var> - policy that grants user management rights. Should be used together with write policy. Allows also to see global variables created by other users (requires also 'test' policy).
| |
| * <var>test</var> - policy that grants rights to run ping, traceroute, bandwidth-test, wireless scan, sniffer, snooper and other test commands
| |
| * <var>sensitive</var> - grants rights to change "hide sensitive" option, if this policy is disabled sensitive information is not displayed, see below list as to what is regarded as sensitive.
| |
| * <var>sniff</var> - policy that grants rights to use packet sniffer tool.
| |
| * <var>romon</var> -
| |
| }}
| |
| | |
| ===Sensitive information===
| |
| | |
| Starting with RouterOS v3.27, the following information is regarded as sensitive, and can be hidden from certain user groups with the ''''sensitive'''' policy unchecked.
| |
| | |
| Also, since RouterOS v4.3, [[Configuration_Management#System_Backup|backup files]] are considered sensitive, and users without this policy will not be able to download them in any way.
| |
| | |
| '''system package'''
| |
|
| |
| /radius: secret
| |
| /snmp/community: authentication-password, encryption-password
| |
| | |
| '''advanced-tools package'''
| |
|
| |
| /tool/sms: secret
| |
| | |
| '''wireless package'''
| |
| | |
| /interface/wireless/security-profiles: wpa-pre-shared-key,
| |
| wpa2-pre-shared-key, static-key-0, static-key-1, static-key-2,
| |
| static-key-3, static-sta-private-key
| |
| /interface/wireless/access-list: private-key, private-pre-shared-key
| |
| | |
| '''wireless-test package'''
| |
| | |
| /interface/wireless/security-profiles: wpa-pre-shared-key, wpa2-pre-shared-key,
| |
| static-key-0, static-key-1, static-key-2, static-key-3, static-sta-private-key, management-protection-key
| |
| /interface/wireless/access-list: private-key, private-pre-shared-key, management-protection-key
| |
| | |
| '''user-manager package'''
| |
| | |
| /tool/user-manager/user: password
| |
| /tool/user-manager/customer: password
| |
| | |
| '''hotspot package'''
| |
| | |
| /ip/hotspot/user: password
| |
| | |
| '''ppp package'''
| |
| | |
| /ppp/secret: password
| |
| | |
| '''security package'''
| |
|
| |
| /ip/ipsec/installed-sa: auth-key, enc-key
| |
| /ip/ipsec/manual-sa: ah-key, esp-auth-key, esp-enc-key
| |
| /ip/ipsec/peer: secret
| |
| | |
| '''routing package'''
| |
| | |
| /routing/bgp/peer: tcp-md5-key
| |
| /routing/rip/interface: authentication-key
| |
| /routing/ospf/interface: authentication-key
| |
| /routing/ospf/virtual-link: authentication-key
| |
| | |
| '''routing-test package'''
| |
| | |
| /routing/bgp/peer: tcp-md5-key
| |
| /routing/rip/interface: authentication-key
| |
| /routing/ospf/interface: authentication-key
| |
| /routing/ospf/virtual-link: authentication-key
| |
| | |
| | |
| ===Notes===
| |
| | |
| There are three system groups which cannot be deleted:
| |
| <pre>
| |
| [admin@rb13] > /user group print
| |
| 0 name="read" policy=local,telnet,ssh,reboot,read,test,winbox,password,web,!ftp,!write,!policy
| |
| | |
| 1 name="write" policy=local,telnet,ssh,reboot,read,write,test,winbox,password,web,!ftp,!policy
| |
| | |
| 2 name="full" policy=local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,password,web
| |
| | |
| 3 name="test" policy=ssh,read,policy,!local,!telnet,!ftp,!reboot,!write,!test,!winbox,!password,!web
| |
| [admin@rb13] >
| |
| </pre>
| |
| Exclamation sign '!' just before policy item name means NOT.
| |
| | |
| | |
| | |
| ===Example===
| |
| | |
| To add reboot group that is allowed to reboot the router locally or using telnet, as well as read the router's configuration, enter the following command:
| |
| <pre>
| |
| [admin@rb13] user group> add name=reboot policy=telnet,reboot,read,local
| |
| [admin@rb13] user group> print
| |
| 0 name="read" policy=local,telnet,ssh,reboot,read,test,winbox,password,web,!ftp,!write,!policy
| |
| | |
| 1 name="write" policy=local,telnet,ssh,reboot,read,write,test,winbox,password,web,!ftp,!policy
| |
| | |
| 2 name="full" policy=local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,password,web
| |
| | |
| 3 name="reboot" policy=local,telnet,reboot,read,!ssh,!ftp,!write,!policy,!test,!winbox,!password,!web
| |
| [admin@rb13] user group>
| |
| </pre>
| |
| | |
| ==Router Users==
| |
| <p id="shbox"><b>Sub-menu:</b> <code>/user</code></p>
| |
| <br />
| |
| | |
| Router user database stores the information such as username, password, allowed access addresses and group about router management personnel.
| |
| | |
| | |
| ===Properties===
| |
| | |
| | |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=address
| |
| |type=IP/mask {{!}} IPv6 prefix
| |
| |default=
| |
| |desc=Host or network address from which the user is allowed to log in
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=group
| |
| |type=string
| |
| |default=
| |
| |desc=Name of the [[#User_Groups | group]] the user belongs to
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=name
| |
| |type=string
| |
| |default=
| |
| |desc=User name. Although it must start with an alphanumeric character, it may contain "*", "_", "." and "@" symbols.
| |
| }}
| |
| | |
| {{Mr-arg-table-end
| |
| |arg=password
| |
| |type=string
| |
| |default=
| |
| |desc=User password. If not specified, it is left blank (hit [Enter] when logging in). It conforms to standard Unix characteristics of passwords and may contain letters, digits, "*" and "_" symbols.
| |
| }}
| |
| | |
| ===Notes===
| |
| | |
| There is one predefined user with full access rights:
| |
| <pre>
| |
| [admin@MikroTik] user> print
| |
| Flags: X - disabled
| |
| # NAME GROUP ADDRESS
| |
| 0 ;;; system default user
| |
| admin full 0.0.0.0/0
| |
| | |
| [admin@MikroTik] user>
| |
| </pre>
| |
| There always should be at least one user with fulls access rights. If the user with full access rights is the only one, it cannot be removed.
| |
| | |
| ==Monitoring Active Users==
| |
| | |
| <p id="shbox"><b>Sub-menu:</b> <code>/user active</code></p>
| |
| | |
| <code>/user active print</code> command shows the currently active users along with respective statisics information.
| |
| | |
| | |
| ===Properties===
| |
| | |
| All properties are read-only.
| |
| | |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-ro-table
| |
| |arg=address
| |
| |type=IP/IPv6 address
| |
| |desc=Host IP/IPv6 address from which the user is accessing the router. 0.0.0.0 means that user is logged in locally
| |
| }}
| |
| | |
| {{Mr-arg-ro-table
| |
| |arg=group
| |
| |type=string
| |
| |desc=[[#User_Group | Group]] that user belongs to.
| |
| }}
| |
| | |
| {{Mr-arg-ro-table
| |
| |arg=name
| |
| |type=string
| |
| |desc=User name.
| |
| }}
| |
| | |
| {{Mr-arg-ro-table
| |
| |arg=radius
| |
| |type=true {{!}} false
| |
| |desc=Whether user is authenticated by RADIUS server.
| |
| }}
| |
| | |
| {{Mr-arg-ro-table
| |
| |arg=via
| |
| |type=console {{!}} telnet {{!}} ssh {{!}}winbox {{!}} api {{!}} web
| |
| |desc=User's access method
| |
| }}
| |
| | |
| {{Mr-arg-ro-table-end
| |
| |arg=when
| |
| |type=time
| |
| |desc=Time and date when user logged in.
| |
| }}
| |
| | |
| | |
| | |
| ===Example===
| |
| To print currently active users, enter the following command:
| |
| <pre>
| |
| [admin@dzeltenais_burkaans] /user active> print detail
| |
| Flags: R - radius
| |
| 0 when=dec/08/2010 16:19:24 name="admin" address=10.5.8.52 via=winbox
| |
| | |
| 2 when=dec/09/2010 09:23:04 name="admin" address=10.5.101.38 via=telnet
| |
| | |
| 3 when=dec/09/2010 09:34:27 name="admin" address=fe80::21a:4dff:fe5d:8e56 via=api
| |
| </pre>
| |
| | |
| ==Remote AAA==
| |
| <p id="shbox"><b>Sub-menu:</b> <code>/user aaa</code></p>
| |
| | |
| Router user remote AAA enables router user authentication and accounting via RADIUS server. The RADIUS user database is consulted only if the required username is not found in the local user database
| |
| | |
| | |
| ===Properties===
| |
| | |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=accounting
| |
| |type=yes {{!}} no
| |
| |default=yes
| |
| |desc=
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=exclude-groups
| |
| |type=list of group names
| |
| |default=
| |
| |desc=Exclude-groups consists of the groups that should not be allowed to be used
| |
| for users authenticated by radius. If radius server provides group specified in
| |
| this list, default-group will be used instead.
| |
| | |
| | |
| This is to protect against privilege escalation when one user (without policy
| |
| permission) can change radius server list, setup it's own radius server and
| |
| log in as admin.
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=default-group
| |
| |type=string
| |
| |default=read
| |
| |desc=User group used by default for users authenticated via RADIUS server.
| |
| }}
| |
| | |
| {{Mr-arg-table
| |
| |arg=interim-update
| |
| |type=time
| |
| |default=0s
| |
| |desc=Interim-Update time interval
| |
| }}
| |
| | |
| {{Mr-arg-table-end
| |
| |arg=use-radius
| |
| |type=yes {{!}}no
| |
| |default=no
| |
| |desc=Enable user authentication via RADIUS
| |
| }}
| |
| | |
| | |
| {{Note|If you are using RADIUS, you need to have CHAP support enabled in the RADIUS server for Winbox to work}}
| |
| | |
| ==SSH Keys==
| |
| <p id="shbox"><b>Sub-menu:</b> <code>/user ssh-keys</code></p>
| |
| | |
| | |
| This menu allows to import public keys used for ssh authentication.
| |
| | |
| {{Warning | User is not allowed to login via ssh by password if ssh-keys for the user is added }}
| |
| | |
| | |
| Properties:
| |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-table-end
| |
| |arg=user
| |
| |type=string
| |
| |default=
| |
| |desc=username to which ssh key is assigned.
| |
| }}
| |
| | |
| | |
| Read-only properties:
| |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-ro-table-end
| |
| |arg=key-owner
| |
| |type=string
| |
| |desc=
| |
| }}
| |
| | |
| | |
| When importing ssh key by <code>/user ssh-keys import</code> command you will be asked for two parameters:
| |
| * '''public-key-file''' - file name in routers root directory containing the key.
| |
| * '''user''' - name of the user to which key will be assigned
| |
| | |
| | |
| === Private keys===
| |
| <p id="shbox"><b>Sub-menu:</b> <code>/user ssh-keys private</code></p>
| |
| | |
| This menu is used to import and list imported private keys. Private keys are used to authenticate remote login attempts using certificates.
| |
| | |
| Read-only properties:
| |
| {{Mr-arg-table-h
| |
| |prop=Property
| |
| |desc=Description
| |
| }}
| |
| | |
| {{Mr-arg-ro-table
| |
| |arg=user
| |
| |type=string
| |
| |desc=
| |
| }}
| |
| | |
| {{Mr-arg-ro-table-end
| |
| |arg=key-owner
| |
| |type=string
| |
| |desc=
| |
| }}
| |
| | |
| | |
| | |
| When importing ssh keys from this sub menu using <code>/user ssh-keys private</code> import command you will be asked for three parameters:
| |
| | |
| * '''private-key-file''' - file name in routers root directory containing private key.
| |
| * '''public-key-file''' - file name in routers root directory containing public key.
| |
| * '''user''' - name of the user to which key will be assigned
| |
| | |
| ===Example===
| |
| [[ M:System/SSH_client#Log-in_using_certificate | Read full example >>]]
| |
| | |
| | |
| [[Category:Manual|A]]
| |
| [[Category:AAA|A]]
| |