Community discussions

MikroTik App
 
User avatar
pcdwarf
just joined
Topic Author
Posts: 23
Joined: Thu Sep 22, 2016 2:00 pm
Location: France, Clermont Ferrand

changing /system default-configuration script

Tue Feb 13, 2018 4:15 pm

Hi

I'm not happy with the wAP default factory settings wich basically prevent them from being configured from the ethernet side wich is considered a "wan" port.
I know about the no-default=yes and the run-after-reset features. The problem is to remotely regain control over a device with a local user without strong computer skills who could make a netinstall.

What I want is to change the script that run when the user pushes the reset button for 5 seconds.
I know it can be dangerous but If I mess things up, I will do a clean netinstall.
In a worst case scenario, making a few bricks would also be a little pain considered the current waste of time trying to regain control on theses boxes.

If not possible, I highly suggest mikrotik to add a new special time to the reset button that basically do the same as /system reset-configuration no-defaults=yes
 
pe1chl
Forum Guru
Forum Guru
Posts: 10221
Joined: Mon Jun 08, 2015 12:09 pm

Re: changing /system default-configuration script

Tue Feb 13, 2018 4:28 pm

Yes you can do that when you netinstall a device.
You can provide your own default-configuration script.
 
User avatar
pcdwarf
just joined
Topic Author
Posts: 23
Joined: Thu Sep 22, 2016 2:00 pm
Location: France, Clermont Ferrand

Re: changing /system default-configuration script

Sun Feb 18, 2018 8:27 pm

Hi,

I though the netinstall script was just a one-time script. (not well documented)
I double-checked and It seems to be run on each system reset (software or button)
That's cool.
What is strange is that it is still the original script which is displayed in /system default-configuration.

Is there a way to view this script inside routerOS ?
(could be a good or bad thing since it may embed cleartext passwords)

Is there a way to modify it thom the console without making a new netinstall ?

What will happen after a software upgrade ?
will a system reset-configuration still use my custom script ? or will it load the default that comes with the new routeros package ?
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1162
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: changing /system default-configuration script

Mon Feb 19, 2018 12:10 am

What is strange is that it is still the original script which is displayed in /system default-configuration.
This is a well known "bug" that has been in ROS for many years.

Is there a way to view this script inside routerOS ?
(could be a good or bad thing since it may embed cleartext passwords)
No

Is there a way to modify it thom the console without making a new netinstall ?
No, you have to NetInstall again.

What will happen after a software upgrade ?
will a system reset-configuration still use my custom script ? or will it load the default that comes with the new routeros package ?
ROS upgrade will not modify the startup config / script.
 
User avatar
pcdwarf
just joined
Topic Author
Posts: 23
Joined: Thu Sep 22, 2016 2:00 pm
Location: France, Clermont Ferrand

Re: changing /system default-configuration script

Wed Feb 21, 2018 2:13 pm

ROS upgrade will not modify the startup config / script.
Thats ok, but are you absolutely sure ?
I remembered that the default config changed on switch products when the new bridging system was introduced.
but it was the "real default". Not a custom script pushed with netinstall.

What about the cAP mode on products that support it ?
Is there way to provide a caps-mode-script via netinstall ?
(or test the chosen mode from inside the script ?)
 
jo2jo
Forum Guru
Forum Guru
Posts: 1003
Joined: Fri May 26, 2006 1:25 am

Re: changing /system default-configuration script

Wed Aug 15, 2018 10:31 pm

I agree w pcdwarf, here is a related thread i started requesting the same thing (ie return to the prior MT default-config ability to configure a brand-new device over eth1, even if done in a secure, time limited, or otherwise, way).

viewtopic.php?f=2&t=117450

Who is online

Users browsing this forum: No registered users and 38 guests