{"id":258281,"date":"2015-05-29T18:59:02","date_gmt":"2015-05-29T14:59:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258281"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258281","title":{"rendered":"UniFi Controller, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 RADIUS \u043b\u043e\u0433\u0438\u043d\u043e\u0432"},"content":{"rendered":"<p>             \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e (\u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 RADIUS-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0432\u0435\u0431-\u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043d\u0430 *nix \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u042f \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u044f\u043b, \u0447\u0442\u043e \u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u0448\u044c \u0434\u043b\u044f *.nix, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c, \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043d\u0430 Windows + NPS (aka RADIUS-\u0441\u0435\u0440\u0432\u0435\u0440).<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 Windows \u0432 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0411\u044b\u043b\u043e<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e80\/ea5\/612\/e80ea56127f54627b42061196106d8b6.png\"\/><\/p>\n<h4>\u0411\u0443\u0434\u0435\u0442<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8ff\/492\/47d\/8ff49247dd3f41eaa7f4814a94687eed.png\"\/><\/p>\n<p>  \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0422\u0414 \u0438 NPS \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443, \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/142070\/\">\u00ab\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0443\u0447\u0435\u0442\u043d\u044b\u043c \u0437\u0430\u043f\u0438\u0441\u044f\u043c Active Directory\u00bb<\/a>. \u0425\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 NPS \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Wi-Fi \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 Unifi Controller \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441 \u043d\u0438\u043c \u043c\u0430\u0448\u0438\u043d\u0435. \u041d\u0438\u0436\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u00ab\u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c\u00bb \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e MAC-\u0430\u0434\u0440\u0435\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043b\u043e\u0433\u0438\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435 Windows \u0437\u0430\u0434\u0430\u0447\u0443, \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 NPS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (\u0416\u0443\u0440\u043d\u0430\u043b: \u00ab\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u00bb, \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a: \u00abMicrosoft Windows security auditing.\u00bb, \u043a\u043e\u0434 \u0441\u043e\u0431\u044b\u0442\u0438\u044f: 6272). \u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u0431\u0443\u0434\u0443\u0449\u0438\u0439 CMD (\u043f\u043e\u0437\u0436\u0435 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0435\u043c\u0443).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/99c\/0a1\/283\/99c0a12835c9429f9eade3cf39c6da7f.png\"\/>  <\/div>\n<\/div>\n<p>  \u0427\u0435\u0440\u0435\u0437 GUI Windows \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 XML \u0438 \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0435\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0431\u043b\u043e\u043a EventTrigger:<\/p>\n<pre><code class=\"xml\">&lt;EventTrigger&gt; \t&lt;Enabled&gt;true&lt;\/Enabled&gt; \t&lt;Subscription&gt;&lt;QueryList&gt;&lt;Query Id=&quot;0&quot; Path=&quot;Security&quot;&gt;&lt;Select Path=&quot;Security&quot;&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=6272]]&lt;\/Select&gt;&lt;\/Query&gt;&lt;\/QueryList&gt;&lt;\/Subscription&gt; &lt;\/EventTrigger&gt; <\/code><\/pre>\n<p>  \u0412 \u043d\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a ValueQueries \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u00ab\u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438\u00bb \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<pre><code class=\"xml\">&lt;EventTrigger&gt; \t&lt;Enabled&gt;true&lt;\/Enabled&gt; \t&lt;Subscription&gt;&lt;QueryList&gt;&lt;Query Id=&quot;0&quot; Path=&quot;Security&quot;&gt;&lt;Select Path=&quot;Security&quot;&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=6272]]&lt;\/Select&gt;&lt;\/Query&gt;&lt;\/QueryList&gt;&lt;\/Subscription&gt; <\/code><\/pre>\n<p> <b><\/p>\n<pre><code class=\"xml\">\t&lt;ValueQueries&gt; \t\t&lt;Value name=&quot;SubjectUserName&quot;&gt;Event\/EventData\/Data[@Name='SubjectUserName']&lt;\/Value&gt; \t\t&lt;Value name=&quot;CallingStationID&quot;&gt;Event\/EventData\/Data[@Name='CallingStationID']&lt;\/Value&gt; \t&lt;\/ValueQueries&gt; <\/code><\/pre>\n<p><\/b><\/p>\n<pre><code class=\"xml\">&lt;\/EventTrigger&gt; <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0434\u0430\u0447\u0438, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0445\u0430\u0431\u0440\u0430\u043f\u0430\u0440\u0441\u0435\u0440 \u0441\u044a\u0435\u043b &amp;gt; &amp;lt;, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u0431\u043b\u043e\u043a\u0435 Subscription \u0432\u043c\u0435\u0441\u0442\u043e \u0443\u0433\u043b\u043e\u0432\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a, \u0438\u043d\u0430\u0447\u0435 \u0438\u043c\u043f\u043e\u0440\u0442 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u0442)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-16&quot;?&gt; &lt;Task version=&quot;1.2&quot; xmlns=&quot;http:\/\/schemas.microsoft.com\/windows\/2004\/02\/mit\/task&quot;&gt;   &lt;Triggers&gt; \t&lt;EventTrigger&gt; \t\t&lt;Enabled&gt;true&lt;\/Enabled&gt; \t\t&lt;Subscription&gt;&lt;QueryList&gt;&lt;Query Id=&quot;0&quot; Path=&quot;Security&quot;&gt;&lt;Select Path=&quot;Security&quot;&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=6272]]&lt;\/Select&gt;&lt;\/Query&gt;&lt;\/QueryList&gt;&lt;\/Subscription&gt; \t\t&lt;ValueQueries&gt; \t\t\t&lt;Value name=&quot;SubjectUserName&quot;&gt;Event\/EventData\/Data[@Name='SubjectUserName']&lt;\/Value&gt; \t\t\t&lt;Value name=&quot;CallingStationID&quot;&gt;Event\/EventData\/Data[@Name='CallingStationID']&lt;\/Value&gt; \t&lt;\/ValueQueries&gt;     &lt;\/EventTrigger&gt;   &lt;\/Triggers&gt;   &lt;Actions Context=&quot;Author&quot;&gt;     &lt;Exec&gt;       &lt;Command&gt;C:\\name_for_mac_unifi.cmd&lt;\/Command&gt;       &lt;Arguments&gt;$(SubjectUserName) $(CallingStationID)&lt;\/Arguments&gt;     &lt;\/Exec&gt;   &lt;\/Actions&gt; &lt;\/Task&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443, \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 XML, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b: <b>$(SubjectUserName) $(CallingStationID)<\/b><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431 \u0438\u0432\u0435\u043d\u0442\u0430\u0445 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445<\/b><\/p>\n<div class=\"spoiler_text\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0432\u0435\u043d\u0442\u0430 \u0432 \u0437\u0430\u0434\u0430\u0447\u0443 \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 <a href=\"http:\/\/www.osp.ru\/win2000\/2012\/08\/13033295\/\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 NPS \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e Wi-Fi \u0441\u0435\u0442\u044c \u0438 \u043d\u0430 \u043d\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u043a, \u0442\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432\u044b\u0448\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 (\u0431\u043b\u043e\u043a Subscription), \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0438\u043c\u0435\u043d\u0438 NPS \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438.  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443. \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u0431\u0430\u0437\u044b mongo, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 Unifi Controller&#8217;\u043e\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 user \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u041c\u0410\u041a \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e name, \u0440\u0430\u0432\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u043d\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0431\u044b\u0447\u043d\u044b\u0439 update). \u0412 CMD \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"dos\">@ECHO off set user=%1 set mac=%2 :: \u043c\u0435\u043d\u044f\u0435\u043c \u0432 \u043c\u0430\u043a\u0435 - \u043d\u0430 : set mac=%mac:-=:%  :: \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043b\u043e\u0433\u0438\u043d \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 - \u043c\u0430\u043a\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0435\u0449\u0435 \u043d\u0435\u0442, \u0441\u0442\u0430\u0432\u0438\u043c &quot;sleep&quot; ping -n 60 127.0.0.1 &gt; nul  :: mongo \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0437\u0430\u0432\u0438\u0441\u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 mongo js \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u043a \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 mongo.exe 127.0.0.1:27117\/ace  --eval &quot;var mac='%mac%'; db.user.update({ mac:mac.toLowerCase()},{$set:{name:'%user%'} });&quot; <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e MONGO \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u0440\u0435\u0434\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u0432 mongo \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0441 Unifi Controller \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435\u0442. \u0415\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043a \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u044b\u043b \u0441\u0432\u0435\u0436\u0435\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043f\u0434\u0435\u0439\u0442 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b. \u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"dos\">C:\\&gt;mongo.exe 127.0.0.1:27117\/ace MongoDB shell version: 2.2.2 connecting to: 127.0.0.1:27117\/ace &gt; db.version() 2.2.2 &gt; version() version: 2.2.2 &gt; <\/code><\/pre>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/www.mongodb.org\/downloads#previous\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435 MongoDB \u043d\u0435\u0442<\/a>, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0431\u0435\u0440\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043b\u044e\u0431\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443:<\/p>\n<p>  <i><a href=\"https:\/\/fastdl.mongodb.org\/win32\/mongodb-win32-i386-2.2.7.zip\">fastdl.mongodb.org\/win32\/mongodb-win32-i386-2.2.7.zip<\/a><\/i><\/p>\n<p>  \u0418 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043d\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u044e mongo:<\/p>\n<p>  <b><i><a href=\"https:\/\/fastdl.mongodb.org\/win32\/mongodb-win32-i386-2.2.2.zip\">fastdl.mongodb.org\/win32\/mongodb-win32-i386-2.2.2.zip<\/a><\/i><\/b><\/p>\n<p>  C 2.2.2 \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0430 \u00ab\u0423\u0420\u0410\u00bb.<\/p>\n<p>  \u0418, \u0434\u0430, \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0430\u0437\u044b \u0442\u043e\u043c\u0443 \u0432\u0438\u043d\u043e\u0439, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u0430\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u043e \u0434\u0430\u0436\u0435 \u0441 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c mongo.  <\/div>\n<\/div>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u0436\u0435\u043b\u0430\u044e \u0443\u0434\u0430\u0447\u0438! \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u044e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u043a\u0440\u0438\u0442\u0438\u043a\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Unifi API<\/b><\/p>\n<div class=\"spoiler_text\">\u0423\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0439 \u0437\u0430\u0442\u0435\u0438 \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0432 \u043a \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043e <a href=\"http:\/\/www.ubnt.su\/FAQ\/index.htm#unifi\">unifi api<\/a> (\u0432\u0438\u0434\u0438\u043c\u043e, \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 \u0432\u043d\u0430\u0447\u0430\u043b\u0435, \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043d\u0435\u043c \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e), \u043d\u043e <a href=\"http:\/\/wiki.ubnt.com\/UniFi_FAQ#UniFi_Controller_API\">\u0441\u0441\u044b\u043b\u043a\u0438<\/a> \u0438 <a href=\"http:\/\/wiki.ubnt.com\/index.php?ns0=1&amp;ns1=1&amp;ns2=1&amp;ns3=1&amp;ns4=1&amp;ns5=1&amp;ns6=1&amp;ns7=1&amp;ns8=1&amp;ns9=1&amp;ns10=1&amp;ns11=1&amp;ns12=1&amp;ns13=1&amp;ns14=1&amp;ns15=1&amp;search=API&amp;title=Special%3ASearch&amp;fulltext=Advanced+search&amp;fulltext=Advanced+search\">\u043f\u043e\u0438\u0441\u043a<\/a> \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0438\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u043b\u0438. <a href=\"https:\/\/code.google.com\/p\/project-tj\/source\/browse\/trunk\/api\/unifi-api.sh\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f\u0445<\/a> \u043f\u0440\u0438\u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u0442\u0430\u0439\u043d\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. <\/p>\n<p>  \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a <i><b>$baseurl\/api\/cmd\/stamgr<\/b><\/i> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <i><b>json={&#8216;cmd&#8217;:&#8217;update-sta&#8217;, &#8216;mac&#8217;:&#8217;${mac}&#8217;, &#8216;name&#8217;:&#8217;$2&#8242;, &#8217;email&#8217;:&#8217;$3&#8242;}<\/b><\/i>.<\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/259139\/\"> http:\/\/habrahabr.ru\/post\/259139\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e (\u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 RADIUS-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0432\u0435\u0431-\u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043d\u0430 *nix \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u042f \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u044f\u043b, \u0447\u0442\u043e \u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u0448\u044c \u0434\u043b\u044f *.nix, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c, \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043d\u0430 Windows + NPS (aka RADIUS-\u0441\u0435\u0440\u0432\u0435\u0440).<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 Windows \u0432 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-258281","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258281"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258281\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}