Password Rules

I am looking for some information on what characters are allowed in command line for creating a password. I am keep trying to use some special characters and it seem not accept them.

I have issues with the $ in the password.

If I set the password through winbox it works fine only seems to be an issue with command line.

password I am trying is te$t1234!

I have tried it as te$t1234! and “te$t1234!” when I try it as te$t1234! the $ is highlighted. If I try setting it up as “te$t1234!” the $ is yellow and the t1234is red. Please see the picture I have added.
Capture.JPG

It looks like RouterOS sees it as start of variable, you can escape it to get around it:

/user add name=test password="te\$t1234!"

Generally you can add any characters you want using escapes for ascii codes. This has the same result ($ = 0x24):

/user add name=test password="te\24t1234!"

But you have to be really carefull with special characters. RouterOS has no support for any character encoding. Only base 7-bit ascii characters are safe. Everything else is just saved as sequence of bytes and it might not work the same everywhere.