{"id":267872,"date":"2015-11-10T12:28:03","date_gmt":"2015-11-10T09:28:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=267872"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=267872","title":{"rendered":"LinOTP+RADIUS. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u0439"},"content":{"rendered":"<br \/>\n<h4>1. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 LinOTP \u0438 FreeRadius \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c CentOS \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 SSH \u043f\u043e \u041e\u0422\u0420, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f Google Authenticator (\u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c).<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>2. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0442\u0440\u0438 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u041e\u0421 CentOS 6.7. \u041e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u044c. \u0418\u043c\u0435\u043d\u0430 \u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043c\u0430\u0448\u0438\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<pre>Hostname     IP \u0430\u0434\u0440\u0435\u0441       \u0423\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 linotp       10.1.0.114     \u0421\u0435\u0440\u0432\u0435\u0440 LinOTP radius-p     10.1.0.122     \u0421\u0435\u0440\u0432\u0435\u0440 RADIUS client       10.1.0.113     \u041a\u043b\u0438\u0435\u043d\u0442<\/pre>\n<p>  \u041d\u0430 \u0421\u0435\u0440\u0432\u0435\u0440\u0435 LinOTP \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u041f\u041e linotp \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0441 \u043e\u0444\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 (<a href=\"http:\/\/linotp.org\/doc\/2.6\/part-installation\/server-installation\/pip_install.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u201cLinOTP Server Installation\u201d<\/a>). \u0412\u0435\u0440\u0441\u0438\u044f \u041f\u041e linotp 2.7.2.<\/p>\n<p>  \u041d\u0430 \u0421\u0435\u0440\u0432\u0435\u0440\u0435 RADIUS \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u041f\u041e freeradius \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442.\u043a. \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 yum. \u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435:<\/p>\n<ul>\n<li>freeradius-2.2.6-6.el6_7.i686;<\/li>\n<li>freeradius-perl-2.2.6-6.el6_7.i686;<\/li>\n<li>perl-devel-5.10.1-141.el6.i686;<\/li>\n<li>perl-Pod-Escapes-1.04-141.el6.i686;<\/li>\n<li>perl-version-0.77-141.el6.i686;<\/li>\n<li>perl-Test-Harness-3.17-141.el6.i686;<\/li>\n<li>perl-ExtUtils-ParseXS-2.2003.0-141.el6.i686;<\/li>\n<li>perl-Digest-SHA-5.47-141.el6.i686;<\/li>\n<li>perl-libs-5.10.1-141.el6.i686;<\/li>\n<li>perl-Module-Pluggable-3.90-141.el6.i686;<\/li>\n<li>perl-5.10.1-141.el6.i686;<\/li>\n<li>perl-ExtUtils-MakeMaker-6.55-141.el6.i686;<\/li>\n<li>perl-DBI-1.609-4.el6.i686;<\/li>\n<li>perl-CPAN-1.9402-141.el6.i686;<\/li>\n<li>perl-Pod-Simple-3.13-141.el6.i686.<\/li>\n<\/ul>\n<p>  \u041c\u0430\u0448\u0438\u043d\u0430 \u041a\u043b\u0438\u0435\u043d\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c RADIUS, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e \u041e\u0422\u0420. \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 RADIUS \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0430\u043a\u0435\u0442 pam_radius-1.3.17-2.el5.<\/p>\n<h4>3. \u0427\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u0438\u0442\u043e\u0433\u0435<\/h4>\n<p>  \u0426\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u041a\u043b\u0438\u0435\u043d\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u0421\u0435\u0440\u0432\u0435\u0440 RADIUS \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u041e\u0422\u0420 (\u0433\u0435\u043d\u0435\u0440\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043d\u0430 \u0421\u0435\u0440\u0432\u0435\u0440\u0435 LinOTP).<\/p>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440 RADIUS \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2013 \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u043e\u0437\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 \u0421\u0435\u0440\u0432\u0435\u0440 LinOTP. \u0421\u0435\u0440\u0432\u0435\u0440 RADIUS \u0445\u0440\u0430\u043d\u0438\u0442 \u0431\u0430\u0437\u0443 NAS, \u0442.\u0435. \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \/etc\/raddb\/clients.conf.<\/p>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440 LinOTP \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445 \u0438 \u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u0430\u0445 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 LinOTP. \u0421\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u041f\u041e linotp \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 MySQL \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<h4>4. \u042d\u0442\u0430\u043f\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h4>\n<p>  <\/p>\n<h5>4.1. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 RADIUS<\/h5>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0421\u0435\u0440\u0432\u0435\u0440\u0435 RADIUS, \u0442.\u0435. \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 radius-p.  <\/p>\n<h5>4.1.1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Perl<\/h5>\n<pre><code># perl -MCPAN -e shell cpan[1]&gt; install LWP cpan[1]&gt; install LWP:UserAgent cpan[1]&gt; install LWP:UserAgent:Determined cpan[1]&gt; install LWP::Protocol::https <\/code><\/pre>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<pre>Running make install   make test had returned bad status, won't install without force Failed during this command:  MSCHILLI\/LWP-Protocol-https-6.06.tar.gz      : make_test NO<\/pre>\n<p>  \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u00abforce install\u00bb, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>cpan[1]&gt; force install LWP::Protocol::https <\/code><\/pre>\n<p>  \u041e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0430:<\/p>\n<pre>Failed during this command:  MSCHILLI\/LWP-Protocol-https-6.06.tar.gz      : make_test FAILED but failure ignored because 'force' in effect<\/pre>\n<p>  <\/p>\n<h5>4.1.2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Radius<\/h5>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c NAS \u043a\u043b\u0438\u0435\u043d\u0442\u0430 radius \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/raddb\/clients.conf. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e:<\/p>\n<pre>client 10.1.0.113 {         secret          = testing123         shortname       = client }<\/pre>\n<p>  \u0412 \u0444\u0430\u0439\u043b \/etc\/freeradius\/users \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 DEFAULT Auth-type := perl.<\/p>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 \/etc\/freeradius\/modules\/perl \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443:<\/p>\n<pre>perl {          module = &lt;\u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 linotp_radius.pm&gt;<\/pre>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 \/etc\/freeradius\/sites-enabled\/default \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b \u201cauthenticate\u201d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre>authenticate{ perl<\/pre>\n<h5>4.1.3. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u2013 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u0430 linotp_radius.pm<\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b linotp_radius.pm \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>#________START______ use strict; use LWP; use LWP::UserAgent::Determined;  # use ... # This is very important ! Without this script will not get the filled  hashesh from main. use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK $URL); use Data::Dumper;  $ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0; $URL = &quot;https:\/\/&lt;IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 LinOTP&gt;\/validate\/simplecheck&quot;;  # This is hash wich hold original request from radius #my %RAD_REQUEST; # In this hash you add values that will be returned to NAS. #my %RAD_REPLY; #This is for check items #my %RAD_CHECK;  # # This the remapping of return values #        use constant    RLM_MODULE_REJECT=&gt;    0;#  \/* immediately reject the request *\/        use constant    RLM_MODULE_FAIL=&gt;      1;#  \/* module failed, don't reply *\/        use constant    RLM_MODULE_OK=&gt;        2;#  \/* the module is OK, continue *\/        use constant    RLM_MODULE_HANDLED=&gt;   3;#  \/* the module handled the request, so stop. *\/        use constant    RLM_MODULE_INVALID=&gt;   4;#  \/* the module considers the request invalid. *\/        use constant    RLM_MODULE_USERLOCK=&gt;  5;#  \/* reject the request (user is locked out) *\/        use constant    RLM_MODULE_NOTFOUND=&gt;  6;#  \/* user not found *\/        use constant    RLM_MODULE_NOOP=&gt;      7;#  \/* module succeeded without doing anything *\/        use constant    RLM_MODULE_UPDATED=&gt;   8;#  \/* OK (pairs modified) *\/        use constant    RLM_MODULE_NUMCODES=&gt;  9;#  \/* How many return codes there are *\/  # Function to handle authorize sub authorize {        # For debugging purposes only #       &log_request_attributes;         # Here's where your authorization code comes        # You can call another function from here:        &test_call;         return RLM_MODULE_OK; }  # Function to handle authenticate sub authenticate {        # For debugging purposes only #       &log_request_attributes;           my $ua = LWP::UserAgent-&gt;new();     my $req = HTTP::Request-&gt;new(GET =&gt; $URL . &quot;?user=&quot; .         $RAD_REQUEST{'User-Name'} . &quot;&pass=&quot; .          $RAD_REQUEST{'User-Password'} );     my $response = $ua-&gt;request( $req );      die &quot;Error at $URL\\n &quot;, $response-&gt;status_line, &quot;\\n Aborting&quot;       unless $response-&gt;is_success;            if($response-&gt;content =~ m\/:\\-\\)\/i) {                return RLM_MODULE_OK;       } else {         $RAD_REPLY{'Reply-Message'} = &quot;LinOTP server denied access!&quot;;                return RLM_MODULE_REJECT;     } }  # Function to handle preacct sub preacct {        # For debugging purposes only #       &log_request_attributes;         return RLM_MODULE_OK; }  # Function to handle accounting sub accounting {        # For debugging purposes only #       &log_request_attributes;         # You can call another subroutine from here        &test_call;         return RLM_MODULE_OK; }  # Function to handle checksimul sub checksimul {        # For debugging purposes only #       &log_request_attributes;         return RLM_MODULE_OK; }  # Function to handle pre_proxy sub pre_proxy {        # For debugging purposes only #       &log_request_attributes;         return RLM_MODULE_OK; }  # Function to handle post_proxy sub post_proxy {        # For debugging purposes only #       &log_request_attributes;         return RLM_MODULE_OK; }  # Function to handle post_auth sub post_auth {        # For debugging purposes only #       &log_request_attributes;         return RLM_MODULE_OK; }  # Function to handle xlat sub xlat {        # For debugging purposes only #       &log_request_attributes;         # Loads some external perl and evaluate it        my ($filename,$a,$b,$c,$d) = @_;        &radiusd::radlog(1, &quot;From xlat $filename &quot;);        &radiusd::radlog(1,&quot;From xlat $a $b $c $d &quot;);        local *FH;        open FH, $filename or die &quot;open '$filename' $!&quot;;        local($\/) = undef;        my $sub = &lt;FH&gt;;        close FH;        my $eval = qq{ sub handler{ $sub;} };        eval $eval;        eval {main-&gt;handler;}; }  # Function to handle detach sub detach {        # For debugging purposes only #       &log_request_attributes;         # Do some logging.        &radiusd::radlog(0,&quot;rlm_perl::Detaching. Reloading. Done.&quot;); }   # # Some functions that can be called from other functions #  sub test_call {        # Some code goes here }  sub log_request_attributes {        # This shouldn't be done in production environments!        # This is only meant for debugging!        for (keys %RAD_REQUEST) {                &radiusd::radlog(1, &quot;RAD_REQUEST: $_ = $RAD_REQUEST{$_}&quot;);        } }  1; #___________END <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0449\u0435\u043d \u0432 \u043f\u0430\u043f\u043a\u0443 \/etc\/raddb\/, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0443\u0442\u044c \u043a \u044d\u0442\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 \/etc\/freeradius\/modules\/perl (\u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435).<\/p>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 radius \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \/usr\/sbin\/radiusd \u2013X \u0438 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u041a\u043b\u0438\u0435\u043d\u0442\u0443 radius \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 LinOTP. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u043a \u041a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u043e ssh \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044f \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 LinOTP \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TCPDUMP. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u043e \u043f\u043e\u0440\u0442\u0443 443 \u0422\u0421\u0420.<\/p>\n<h5>4.2. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 LinOTP<\/h5>\n<p>  LinOTP \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 (<a href=\"https:\/\/www.linotp.org\/doc\/latest\/part-management\/quickstart.html\">\u0441\u043c. \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 LinOTP \u2013 QuickStart Guide<\/a>).<\/p>\n<p>  LinOTP \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043e\u043d \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0437 LDAP, MySQL \u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h5>4.2.1. \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0423\u0417<\/h5>\n<p>  \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 useridresolver \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 LinOTP \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b SQL \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f \u201cpassword\u201d. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a \u043f\u043e\u0440\u0442\u0430\u043b\u0443 self service. \u0415\u0441\u043b\u0438 \u044d\u0442\u0438\u043c \u043f\u043e\u0440\u0442\u0430\u043b\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c, \u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0436\u0435 \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432. \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041f\u0440\u0438\u043c\u0435\u0440:<br \/>  ALTER TABLE usertable ADD password VARCHAR(200);<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u043c \u0445\u0435\u0448 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre>\/opt\/LINOTP\/bin\/linotp-create-sqlidresolver-user -u &lt;\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&gt; -i &lt;\u0435\u0433\u043e \u043f\u043e\u043b\u0435 id \u0432 \u0431\u0430\u0437\u0435&gt; -p &lt;\u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c&gt;<\/pre>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0438\u0434\u0430:<\/p>\n<pre>user7;2;{SSHA512}3QWyB5u2TkPLDc2mjIJxtcCLOVHSjLS\/MyYjPGNIENchm5riFHF3M9CW7csaxADAFml8WkH\/Whd1A047nUAaeWk2dFZod1ZhYzN3cTRNUkpRdlhrLmVsdFVSeUNIaUdWVEZVT1ZycW5BSlVXajVHbHVvckhHSmNYOWp5M3FQLi8=;<\/pre>\n<p>  \u0412\u0441\u0435, \u0447\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u0436\u0435\u043b\u0442\u044b\u043c \u2013 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0445\u0435\u0448 \u043f\u0430\u0440\u043e\u043b\u044f. \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u043b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<pre>update usertable set password = &lt;\u0445\u0435\u0448, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e&gt; where user = 'user7' ;<\/pre>\n<h5>4.2.2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a LinOTP<\/h5>\n<p>  \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c LinOTP \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0433\u0438\u0431\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0442\u0438\u043f\u044b \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u043b-\u0432\u0443 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 \u0442.\u043f.<\/p>\n<p>  \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b LinOTP \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/saveimg.ru\/pictures\/09-11-15\/d824e07bc20fc0d7437b0cf5ff5a0db1.jpg\" alt=\"image\"\/><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u2014 \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/i><\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u2013 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u201cmaxtoken\u201d.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/saveimg.ru\/pictures\/09-11-15\/f02abd735ee492747d767fd9347b3e8c.jpg\" alt=\"image\"\/><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 \u2014 \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u0440\u0442\u0430\u043b\u0430 \u0441\u0430\u043c\u043e\u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f<\/i><\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043d\u0438\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442\u0430\u043b \u0441\u0430\u043c\u043e\u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/saveimg.ru\/pictures\/09-11-15\/ca87460b93afbd325aadfe013b47b74a.jpg\" alt=\"image\"\/> <br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 3 \u2013 \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438<\/i><\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c (\u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 scope=system \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/saveimg.ru\/pictures\/09-11-15\/c1c4eb851e215961d5f9c3ac93ee066e.jpg\" alt=\"image\"\/><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4 \u2013 \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/i><\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0432\u043e\u0434 \u041e\u0422\u0420-PIN \u0438 OTP \u043f\u0440\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435(\u041a\u043b\u0438\u0435\u043d\u0442\u0435). \u0417\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 otppin=0. \u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0435\u0433\u043e \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab2\u00bb \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e OTP. \u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0435\u0433\u043e \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab1\u00bb \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u041f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f+OTP (\u043f\u0430\u0440\u043e\u043b\u044c \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u043b \u0441\u0430\u043c\u043e\u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f).<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 otppin=0; \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c user3 \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043a\u0435\u043d \u0441 OTP-PIN = 123456 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u041e\u0422\u0420=234567. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f user3 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043f\u043e ssh \u043a \u041a\u043b\u0438\u0435\u043d\u0442\u0443 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434 &lt;OTP-PIN&gt; \u0442.\u0435. 123456234567.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u041a\u043b\u0438\u0435\u043d\u0442\u0430, \u0442.\u0435. \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e OTP \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.       <\/p>\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\/270571\/\"> http:\/\/habrahabr.ru\/post\/270571\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h4>1. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 LinOTP \u0438 FreeRadius \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c CentOS \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 SSH \u043f\u043e \u041e\u0422\u0420, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f Google Authenticator (\u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c).  <\/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-267872","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267872","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=267872"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267872\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}