Difference between revisions of "Useful Bash Scripts"

From MikroTik Wiki
Jump to: navigation, search
(Adding a User)
Line 21: Line 21:
  
 
Open Webmin in your favorite internet browser. Then follow below instructions.
 
Open Webmin in your favorite internet browser. Then follow below instructions.
 +
 +
Step 1:
 +
  
 
[[File:Webmin-new-custom-command-1.jpg]]
 
[[File:Webmin-new-custom-command-1.jpg]]
 +
 +
 +
Step 2:
 +
 +
Please check that all marked settings are properly filled as per the snapshot below.
 +
 +
 +
[[File:Webmin-new-custom-command-2.jpg]]

Revision as of 03:48, 11 September 2011

Version.png

Applies to RouterOS: v3, v4

Overview

Here are some small and very useful bash scripts that I have written and I use them from WebMin to perform some small tasks. These Include

  • Adding a user in PPP -> Secrets
  • Deleting a user in PPP -> Secrets
  • Editing user credentials (such as ID, Password, Profile, MAC-Address, etc...) in PPP -> Secrets
  • Disable a user in PPP -> Secrets

Please make sure that you follow this article and setup ssh-keys to execute command from Linux to Mikrotik using SSH without password

Once you have everything setup properly. Then follow the instructions below to create new commands in Webmin and add scripts to that to make everything work properly. The scripts can be used from almost any Linux Distribution that supports Bash.

Adding a User

Make sure that you have webmin installed and running properly. Then follow these snapshots to create a new Custom Command that will perform the task of Adding New User to Mikrotik

Open Webmin in your favorite internet browser. Then follow below instructions.

Step 1:


Webmin-new-custom-command-1.jpg


Step 2:

Please check that all marked settings are properly filled as per the snapshot below.


Webmin-new-custom-command-2.jpg