Section 3.3 of the Wildfly 12 Admin Guide describes the process for adding a user in order to be able to access Wildfly's admin console:
To manipulate the files and add users we provide a utility add-user.sh
and add-user.bat to add the users and generate the hashes, to add a
user you should execute the script and follow the guided process.
The full details of the add-user utility are described later but
for the purpose of accessing the management interface you need to
enter the following values: -
Type of user - This will be a 'Management User' to selection option a.
Realm - This MUST match the realm name used in the configuration so
unless you have changed the configuration to use a different realm
name leave this set as 'ManagementRealm'.
Username - The username of the user you are adding.
Password - The users password.
Provided the validation passes you will then be asked to confirm you
want to add the user and the properties files will be updated.
For the final question, as this is a user that is going to be
accessing the admin console just answer 'n' - this option will be
described later for adding slave host controllers that authenticate
against a master domain controller but that is a later topic.
Updates to the properties file are picked up in real time so either
click 'Try Again' on the error page that was displayed in the browser
or navigate to the console again and you should then be prompted to
enter the username and password to connect to the server.
There are a couple of potential pitfalls when running the add-user utility:
- You must select option a) (Management User) for the type of user.
- You must use realm ManagementRealm, though this should happen automatically if the type of user being added is Management User.
But rather than diagnosing what went wrong, it's easier just to try adding another user, following the directions given in the documentation shown above. For reference, here's a screen shot of what I did, where the yellow horizontal bars are points at which I submitted something from the keyboard:

After running add-user.bat I was able to login to the Admin Console (http://localhost:9990) using the user I had just created, and no server restart was necessary. My environment was Eclipse Photon on Windows 10.
If you are still having problems, open the file mgmt-users.properties to see whether your user was added successfully. In my case a line was added for the new user that looked like this:
skomisa=82fa5e2f2de46d60adf210bb95d461f3