Community discussions

MikroTik App
 
supermega
just joined
Topic Author
Posts: 21
Joined: Sun Sep 25, 2011 8:06 pm

[6.0, 6.1, 6.2] Bug in Reset Configuration permissions

Wed Sep 04, 2013 8:58 am

Hi,

I'm trying to reset configuration (with "keep-users") as a user with all perms but "policy". I get an error:
/system reset-configuration keep-users=yes
Dangerous! Reset anyway? [y/N]:
y
system configuration will be reset
not enough permissions (9)
/user group print
[...]
3 name="name" policy=local,telnet,ssh,ftp,reboot,read,write,test,winbox,password,web,sniff,sensitive,api,!policy

"policy" is permission to change user configuration. "keep-users" parameter means "don't change user configuration". As a result "/system reset-configuration keep-users=yes" should be allowed without "policy" permission.
 
telepro
Frequent Visitor
Frequent Visitor
Posts: 69
Joined: Sun Apr 03, 2011 7:50 pm

Re: [6.0, 6.1, 6.2] Bug in Reset Configuration permissions

Thu Sep 05, 2013 4:15 pm

i have not seen the error you reported when i log on using winbox using the admin account and start a terminal session to enter the commands. i suspect that the admin account may have the 'policy' ploicy.

However, if i do try the reset command with a request to run an x.rsc file after reset

/system reset-configuration keep-users=yes skip-backup=yes no-defaults=yes run-after-reset=xxxxxx.rsc

where the file xxxxxx.rsc exists in the file list.

The configuration is successfully reset but the file is not run after restart. Unless i am missing some other prerequisite, this seems to not have worked in any of the 6.x releases so far.

Have you successfully tried to use the run-after-reset command? Is there some other requirement outside of an existing file?
 
supermega
just joined
Topic Author
Posts: 21
Joined: Sun Sep 25, 2011 8:06 pm

Re: [6.0, 6.1, 6.2] Bug in Reset Configuration permissions

Wed Oct 30, 2013 12:34 am

cieplik206,
run-after-reset works well. I had problems with it until I looked at default MT script, it starts with:
:while ([/interface ethernet find] = "") do={:delay 1s;}
This means: wait for any ethernet interface
If you don't wait you may execute a command that fails due to no interfaces recognized. Failing one command stops executing the script.

Yes, admin account has all perms.

In 6.5 I still can't do "/system reset-configuration keep-users=yes" as a user with all perms but "policy".

Who is online

Users browsing this forum: iDaemon and 223 guests