Clear user command history

Hi,

is there any way clearing the command history of a user? We used the “/tool fetch” command on a customers router which expects the password as a clear text parameter. Now we have it in the cli history (up arrow) and can’t get it out from there! :wink: Workaround would be adding a new user with “full” group permissions and hand the new username out to the customer. Afterwards delete the old one. That works. Any other ideas?

thanks
Oliver

As far as I know it is not possible.

Maybe an added feature (requiring the full user permission) ?:
[/system console reset-command-history]

that’s why first make another admin user, then do the private stuff from there.

I will next time! :wink: Is there any technical reason why RouterOS behaves like this? Every router hardware I know deletes the history after reboot. Keeping the history is a good thing, but there should be a way to clear it. If this is not a big deal take it as a “feature request”.

thanks
Oliver

You will see this is very common, in stead of addressing the issues MT will give some crazy work around that does not directly address you issue, but is enough to keep you quite for now.

SO no they do NOT feel like coding this feature many people on this board have asked for.

sad

I think it would be fairly trivial to do, maybe:
echo > /path/to/history/file

I think this is a very critical issue here. We were doing some digging, and found that this is not possible at all. Even if we create another user, as suggested by sergejs, any command line history still stays in memory, and returns once the user is recreated, even after reboots!

We were creating an in-house system to intelligently manage large number of Mikrotik Routers on customer premises, but if there is no way to delete history, then this is a major issue.

Please advise!

I’m gonna give this a big bump!

I find it easier to create new users from the command line, but I don’t do it anymore because the password that is set is in plain text in the history. Not good when there’s no way to clear it!

Shouldn’t be that difficult to add /system history clear…

Has this feature been added yet? It’s really critical for security.

I also vote to have this security problem fixed. Creating a new user does not clear the history.

we have added history clear command in next RouterOS v6.3

Is this feature now from version 6.3 included? When yes how is the command?

clear-history – clear command history for all users

[admin@demo2.mt.lv] > console clear-history