Struggling to debug this PEAR2_Net_RouterOS-1.0.0b6 issue.
MIK Model: RBSXTR
Firmware: 6.45.2
API on ROS is enabled
User exists
Password is correct
All firewall rules on MIK disbaled
Firewall rules on win7 allow incoming and outgoing port 8728
IIS ver 6.1
Localhost connection
Connecting to the MIK via http I get the following error:
10000 Invalid username or password supplied.
Connecting via CLI I get the following error:
Login refused. Possible reasons:
-
No such username.
Make sure you have spelled it correctly. -
The user does not have the “api” privilege.
Check the permissions of the user’s group at “/user group”. -
The user is not allowed to access the router from your web server’s IP.
Check the “address” property at the “/user” menu.
If it’s empty, that’s not the problem for sure. If it’s non-empty however,
make sure your IP is in that list, or is at least matched as part of an
otherwise larger subnet. -
Mistyped password.
Make sure you have spelled it correctly.
If it contains spaces, don’t forget to quote the whole password.
If it contains non-ASCII characters, be careful of your locale.
It must match that of the terminal you set your password on, or you must
type the equivalent code points in your current locale, which may display as
different characters.
In Mik logs the following:
login failure for user from via API
BUT. Username definitely exists. Permissions = Full
Following guidance/troubleshooting from these posts:
http://forum.mikrotik.com/t/php-api-connection-problem/46286/1 and
http://forum.mikrotik.com/t/adding-user-to-userman-via-php/68479/1
Looks like the MIK is not parsing this line correctly:
$util = new RouterOS\Util($client = new RouterOS\Client(‘<My router IP’, ‘<My username’, ‘’));
Have also tried:
$util = new RouterOS\Util($client = new RouterOS\Client(“<My router IP”, “<My username”, “”));
with the same result.
Anyone have any ideas? Thanks!