Three separate things share the "AAA" name: the router's own users (/user, for people who manage the device), PPP
users (/ppp/secret and /ppp/profile, for VPN and PPPoE clients), and the RADIUS client (/radius) that can answer for
either of them and for HotSpot, wireless, DHCP and IPsec. Local entries win over RADIUS in all cases.
Router users and groups
/user/group/add name=ops policy=ssh,read,write,password,test
/user/add name=alice group=ops password="REPLACE-WITH-A-LONG-PASSWORD" address=192.168.88.0/24
/user/print
- Each user is in exactly one group; the group's policies decide the rights, and a policy not listed is revoked. The built-in
groups
read,writeandfullcannot be deleted, andreadstill containsrebootandsensitive: do not give it to untrusted people; make a custom group instead. Policies of interest:ssh,winbox,web,api,rest-api,ftp,reboot,read,write,policy(manage users),sensitive(see and export secrets),sniff,test,local. address=limits the login to source prefixes. Names accept letters, digits and_ . # - @and must end with a letter or digit.- Passwords accept any characters, but in scripts and quoted strings escape
",\and$(an unescaped$starts a variable and silently shortens the password).password=""allows blank logins; never do that. - Users change their own password with
/password(needs thepasswordpolicy). An administrator can force a change with/user/expire-password alice./user/settingssetsminimum-password-lengthandminimum-categories. - Idle sessions:
inactivity-timeoutandinactivity-policy=logout|lockscreenper user. - Check who is logged in with
/user/active/printand end a session with/user/active/remove. - Replace the default
admin: create a named account, test it in a second session, then/user/disable admin. A lost password cannot be recovered (seerouteros-troubleshooting).
SSH keys
/user/ssh-keys/import public-key-file=alice.pub user=alice info="alice laptop"
/ip/ssh/set password-authentication=no # key-only logins (default yes-if-no-key)
When a user has a key, SSH password login is disabled for that user. Imports accept OpenSSH one-line, PKCS#1 and PKCS#8 public
keys. Router-side private keys (/user/ssh-keys/private) accept PKCS#1/PKCS#8 only, not the OpenSSH private format.
RADIUS
/radius/add service=login address=192.0.2.36 secret="REPLACE-ME"
/user/aaa/set use-radius=yes default-group=read
/radius/add service=ppp,hotspot address=192.0.2.3 secret="REPLACE-ME"
/radius/monitor 0
serviceselects the consumers:login,ppp,hotspot,wireless,dhcp,ipsec,dot1x. The order of entries matters.- RADIUS is asked only for names that do not exist locally. Users from RADIUS get
default-group(readby default) unless the server returnsMikrotik-Groupwith a local group name;exclude-groupslists groups the server may never grant. - For CHAP and MS-CHAP the shared secret is only checked in the reply, so a wrong secret looks like a server that accepts and a router
that rejects: look at
/radius/monitorfor bad responses. - RadSec (
protocol=radsec, acertificate=) uses TCP 2083 and the fixed shared secretradsec. - A RouterOS RADIUS server is User Manager (
routeros-user-manager). Disconnect requests arrive through/radius/incoming. - Attribute reference and numeric values:
references/guides/authentication-authorization-accounting/radius.md.
PPP users and profiles
/ppp/profile/add name=vpn local-address=10.0.0.1 remote-address=vpn-pool use-encryption=yes
/ppp/secret/add name=user1 password="REPLACE-ME" profile=vpn service=l2tp
/ppp/aaa/set use-radius=no accounting=yes
A user's effective settings combine the secret, its profile, and the default profile for the service; single addresses beat pools.
only-one limits a user to one session. A profile can add the session interface to a bridge, an address list, filters
(incoming-filter, outgoing-filter), rate limits and IPv6 pools. The server menus that use this are in routeros-vpn.
802.1X
/interface/dot1x/server makes a port an authenticator: it blocks everything except EAPOL until the client has been authenticated
by a RADIUS server (auth-types=dot1x,mac-auth, optional guest-vlan-id). On a bridge port the bridge must run RSTP/MSTP or EAP
packets are not accepted. /interface/dot1x/client makes the router a supplicant with EAP-TLS, EAP-TTLS, EAP-PEAP or EAP-MSCHAPv2
(certificates: routeros-certificates). Not supported on SMIPS devices (hAP lite, hAP lite TC, hAP mini). The guide has complete
authenticator and supplicant examples.
Where to look
| Need | Open |
|---|---|
| Users, groups, password policy, SSH keys, RADIUS logins | references/guides/authentication-authorization-accounting/user.md |
| RADIUS client properties, RadSec, attributes | references/guides/authentication-authorization-accounting/radius.md |
| PPP profiles, secrets, active sessions | references/guides/authentication-authorization-accounting/ppp-aaa.md |
| 802.1X client and server | references/guides/authentication-authorization-accounting/dot1x.md |
| All properties | references/cli/user.md, references/cli/radius.md, references/cli/ppp/aaa.md, references/cli/interface/dot1x/ |
| Everything else | references/INDEX.md |
Related skills: routeros-initial-setup (hardening), routeros-vpn, routeros-hotspot, routeros-user-manager,
routeros-certificates, routeros-management-tools (SSH, WinBox, API access).