rconfig / rconfig

rConfig V6 Core
GNU General Public License v3.0
104 stars 15 forks source link

Mikrotik Default Terminal Banner - Fails to execute export command #128

Closed Crash0v3r1de closed 1 month ago

Crash0v3r1de commented 2 months ago

Describe the bug With any Mikrotik device (with custom branding banner or default), the Mikrotik noenable v2 (and the others) will "complete successfully" however the export command is never sent as the system parsing the main string saved doesn't wait until initial post login output is complete.

Every backup only contains this: ` MikroTik RouterOS 7.15.3 (c) 1999-2024 https://www.mikrotik.com/

Press F1 for help `

To Reproduce Steps to reproduce the behavior:

  1. Import templates from Github
  2. Create template using mikrotik-ssh-noenable_v2.yml
  3. Assign device all correct information for login and post auth prompts
  4. Run backup on device
  5. Check downloaded "config" and admire the output

Expected behavior The CLI on Mikrotik spits out alot of junk by default - https://prnt.sc/sDG0U9TtwwYY As you can see, this is alot to parse for simply logging in, so unless there's a template setting I can adjust this may need some backend tweaks? I can provide whatever you need to reproduce this. Also could spin up a CHR box if you need a test device.

Screenshots https://prnt.sc/jo1ZwCUsZrBH https://prnt.sc/Mwjy9nlRiOQ5 https://prnt.sc/sDG0U9TtwwYY

rConfig Version Information (You can copy this from the rConfig dashboard): OS: Ubuntu 24.04 LTS PHP / LARAVEL VERSION - 8.3.10 / 10.48.18 REDIS VERSION 7.0.15 MYSQL VERSION 10

**Logs info (can be retrieved from /var/www/html/rconfig6/storage/logs - try to paste relevant logs only)

Additional context Should be pretty self explanatory from the above information, not sure what else I can try or tweak on my environment to attempt to get rConfig to be happy with the MASSIVE post login banner before the prompt comes up.

stephenstack commented 2 months ago

HI,

Can you try to set the prompt in the UI to any other than the prompt. Then set the template timeout to 10 seconds. After this is done, run a debug command, and post the output. Sanitized of course. https://docs.rconfig.com/general/troubleshooting/#rconfig-command-line-tools Thanks

Crash0v3r1de commented 2 months ago

HI,

Can you try to set the prompt in the UI to any other than the prompt. Then set the template timeout to 10 seconds. After this is done, run a debug command, and post the output. Sanitized of course. https://docs.rconfig.com/general/troubleshooting/#rconfig-command-line-tools Thanks

Disable/remove the default banner? That's not a possibility in my situation, you have to be a reseller to change/try to remove the banner.

As for the debug it shows the full output - including the prompt waiting for the export command, and template timeout is 10 seconds by default. I've attached the debug. rconfig_debug_output.txt

stephenstack commented 2 months ago

Ok, thanks no sure where i said remove the banner, its ok to leave it. WHat is the usename you have configured in rCOnfig. It must have a +cte attached to it i.e; useradmin+cte

Crash0v3r1de commented 2 months ago

Ok, thanks no sure where i said remove the banner, its ok to leave it. WHat is the usename you have configured in rCOnfig. It must have a +cte attached to it

i.e;

useradmin+cte

Nope, it's oxidized.user

stephenstack commented 1 month ago

Sorry for the delay in response. If you update the username to oxidized.user+cte

does it work?

Crash0v3r1de commented 1 month ago

Sorry for the delay in response. If you update the username to oxidized.user+cte

does it work?

Debug shows the same output however it seems the scheduled jobs has been broken since 9/5/2024, the system was updated so it may have upgraded a package rConfig requires to be an older version?

I can't really test much further until I know what dependencies are needed so I can verify they're correct and installed. It's worth noting the queue manager has a status of "inactive".

stephenstack commented 1 month ago

Hi, its hard to debug without more info. please contact info@rconfig.com and we'll try to bring some further support

rconfig commented 1 month ago

Hi Any update on this or can i close it?

Crash0v3r1de commented 1 month ago

Hi Any update on this or can i close it?

I ended up going back to Oxidized, I'll close it.