{"id":5374,"date":"2016-11-01T08:54:10","date_gmt":"2016-11-01T14:54:10","guid":{"rendered":"http:\/\/gregsowell.com\/?p=5374"},"modified":"2016-11-01T08:54:10","modified_gmt":"2016-11-01T14:54:10","slug":"bulk-mikrotik-usermanager-import","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=5374","title":{"rendered":"Bulk Mikrotik Usermanager Import"},"content":{"rendered":"<p>The <a href=\"http:\/\/wiki.mikrotik.com\/wiki\/Manual:User_Manager\">Mikrotik Usermanager<\/a> is a radius package you can optionally install on a router.  This gives you the ability to locally or remotely authenticate users for: Hotspot, PPP, DHCP, Wireless, or RouterOS logins.  It has some paypal\/authorize.net integration, but the features are so limited I&#8217;d personally look at a different solution.<\/p>\n<p>It is actually a decent system for small standalone VPN authentication(you can allow users to create\/modify users without having to login to the router itself).  I recently had need to bulk import users, but ran into some issues.<\/p>\n<p>Customers are actually admins that login to the administrative backend.  Users are created to allow login to your various systems.  When adding users you must specify a profile, and one doesn&#8217;t exist by default.<\/p>\n<p>First create a default profile.  After you have a profile, it will automatically be applied to new users created through the webpage&#8230;but what if you want to bulk import via CLI?  When adding users via CLI there is not direct method to add a profile to a user, which means anyone added will be unusable(just fantastic).<\/p>\n<p>The workaround I found is to create a template user via the web interface, then use the &#8220;copy-from&#8221; command via CLI.  The copy-from command will copy the profile setting and apply it to your new users:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">\/tool user-manager user\r\nadd customer=admin disabled=no shared-users=2 username=MyUserName password=MyPassword copy-from=0<\/code><\/pre>\n<p>I think usermanager is good as a simple standalone manager that gives a web interface for simple administration.  Any of you guys have opinions, thoughts, questions, let me know in the comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Mikrotik Usermanager is a radius package you can optionally install on a router. This gives you the ability to locally or remotely authenticate\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-5374","post","type-post","status-publish","format-standard","hentry","category-mikrotik"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/5374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5374"}],"version-history":[{"count":1,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/5374\/revisions"}],"predecessor-version":[{"id":5376,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/5374\/revisions\/5376"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}