Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mikrotik Bulk Users Setup

ntue

Technical User
Jun 8, 2019
9
0
1
ZW
Hello Everyone. How do I create an excel list of bulk users and import it to mikrotik hotspot? IP > Hotspot > Users. May I have the step by step setup? Attached is the excel example although it is in pdf format. Secondly how do i print user coupons created in userman on Mikrotik Routeros 7 and above?
 

Attachments

  • users.pdf
    95.3 KB · Views: 0
To create a list of bulk users in Excel and import them into the MikroTik Hotspot system, you'll need to convert the Excel data into a format that MikroTik can accept, such as a script or via direct database import. Let’s walk through the steps for both creating the list and importing it.

Step 1: Creating a Bulk User List in Excel

  1. Prepare the Excel sheet: In the Excel sheet, you'll need the following columns:
    • Username: The login name for the users.
    • Password: The password for each user.
    • Profile: The hotspot profile for the user (if applicable).
    • Limitations: If there are any bandwidth or time limitations.
    • Comments: Optional comments for each user.
Here’s an example of what your columns could look like:
| Username | Password | Profile | Limitations | Comment |
|----------|----------|---------|-------------|---------|
| user1 | pass1 | default | none | student |
| user2 | pass2 | default | none | guest |

  1. Save the Excel sheet as CSV:
    • After you've filled in your user data, save the Excel file as a CSV file. This can be done by selecting "File > Save As", then choosing CSV (Comma Delimited).

Step 2: Importing Users via MikroTik Hotspot

  1. Convert the CSV to a Script:
    • MikroTik RouterOS supports importing users through scripts. You’ll need to convert the CSV into a script that RouterOS can execute.
    • The script format should look like this:
  2. /ip hotspot user
    add name="user1" password="pass1" profile="default"
    add name="user2" password="pass2" profile="default"
    • Import the Script:
      • Copy the content of your script into a .rsc file (MikroTik script file). You can do this in any text editor (e.g., Notepad++) and save it as bulk_users.rsc.
      • Upload the Script to the MikroTik device:
        1. Use Winbox or FTP to upload the script file to your MikroTik device.
        2. Navigate to Files in Winbox and drag-and-drop the .rsc file into the device.
    • Run the Script:
      • Open New Terminal in Winbox.
      • Run the script by typing:
    • /import file-name=bulk_users.rsc

    This will add the bulk users from your CSV file into the MikroTik Hotspot.

    Step 3: Printing User Coupons in User Manager (RouterOS 7 and Above)

    To print user coupons generated in User Manager:
    1. Log into User Manager:
      • Access User Manager via your MikroTik router's web interface.
    2. Create Users:
      • Go to Users and create new users by setting a profile, username, and password. You can also generate bulk users here.
    3. Generate Coupons:
      • After creating the users, select them from the user list and choose Generate Vouchers (this is under the "Add" option in User Manager).
    4. Export/Print Coupons:
      • Once the vouchers are generated, you can export them to PDF or another printable format. There should be a "Print" or "Export" button that allows you to print the coupons in bulk.
    5. Customize Coupon Layout:
      • If needed, customize the layout of the coupons in the Settings section of User Manager, where you can choose which information is displayed
 

Part and Inventory Search

Sponsor

Back
Top