{"id":264811,"date":"2015-09-02T15:26:05","date_gmt":"2015-09-02T11:26:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=264811"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=264811","title":{"rendered":"\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 MS DNS \u0438\u0437 Linux"},"content":{"rendered":"<br \/>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043b\u0443\u0436\u0431\u044b <acronym>AD<\/acronym> \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u041e\u0421 Ubuntu Linux, \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043d\u0435\u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Samba, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u00abnet ads dns register\u00bb. \u0427\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043f\u0443\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u0443\u0445 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 dhclient.conf \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u00abERROR_DNS_GSS_ERROR\u00bb \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u00abnet ads dns register -P\u00bb.<\/p>\n<p>  \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0431\u0430\u0433-\u0440\u0435\u043f\u043e\u0440\u0442\u043e\u0432, \u0438 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e  <a href=\"http:\/\/habrahabr.ru\/users\/warlock_ua\/\" class=\"user_link\">Warlock_ua<\/a> <a href=\"http:\/\/habrahabr.ru\/post\/221843\/\">\u00ab\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 DNS \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 Windows \u0434\u043e\u043c\u0435\u043d\u0435 \u0438\u0437 Linux (GSS-TSIG)\u00bb<\/a>. \u0418\u0434\u0435\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439. \u041d\u043e \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 DNS-\u0437\u043e\u043d\u044b. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 Windows \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043a\u0430\u0436\u0434\u0430\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 DNS. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u044d\u0442\u0438\u043c \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f?<\/p>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b \u0441\u043a\u0440\u0438\u043f\u0442 learn-address.sh \u043e\u0442  <a href=\"http:\/\/habrahabr.ru\/users\/warlock_ua\/\" class=\"user_link\">Warlock_ua<\/a>, \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0435\u0433\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434. \u0418 \u0432\u043e\u0442 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<a name=\"habracut\"><\/a><\/p>\n<h2>\u041e\u0431 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435<\/h2>\n<p>  \u0418\u043c\u0435\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 AD \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Windows Server 2008 R2 Standard, \u0430 \u0442\u0430\u043a\u0436\u0435 MS DNS \u0441\u0435\u0440\u0432\u0435\u0440. \u0418\u043c\u0438 \u0437\u0430\u0432\u0435\u0434\u0443\u044e\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b Windows. DHCP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 Cisco. \u042d\u0442\u0438\u043c \u0437\u0430\u0432\u0435\u0434\u0443\u044e\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0435\u0442\u0438. \u0427\u0442\u043e \u0442\u0430\u043a, \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0432\u0441\u0435 \u044d\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u043e\u0431\u043b\u0430\u043a\u0435, \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u041e\u0421 Ubuntu 14.04 (Trusty), \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u041f\u041e Samba 4.1.6, isc-dhcp-client. \u042d\u0442\u043e \u043f\u043e \u043c\u043e\u0435\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<h2>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 DNS<\/h2>\n<p>  \u0412\u0441\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0432\u0432\u043e\u0434\u0430 \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Ubuntu \u044f \u0432 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442.\u00a0\u043a. \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u043f\u0438\u0448\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>  \u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 DNS, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0432\u0435\u0434\u0435\u043d \u0432 \u0434\u043e\u043c\u0435\u043d. \u0422.\u0435. \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0434\u043e\u043c\u0435\u043d\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u0437 Trivial DataBase. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"http:\/\/manpages.ubuntu.com\/manpages\/trusty\/en\/man8\/tdbdump.8.html\">tdbdump<\/a>:<\/p>\n<pre><code class=\"bash\">tdbdump -k SECRETS\/MACHINE_PASSWORD\/GKSM | sed 's\/\\\\\\00$\/\/' <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <a href=\"http:\/\/web.mit.edu\/Kerberos\/krb5-1.12\/doc\/formats\/keytab_file_format.html\">keytab-\u0444\u0430\u0439\u043b<\/a> \u0441 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"http:\/\/manpages.ubuntu.com\/manpages\/trusty\/en\/man1\/ktutil.1.html\">ktutil<\/a>:<\/p>\n<pre><code class=\"bash\">ktutil &lt;&lt;EOF addent -password -p $cn@DOMAIN.LOCAL -k 1 -e rc4-hmac $MPAS write_kt $keytab_file quit EOF <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"http:\/\/web.mit.edu\/Kerberos\/www\/krb5-devel\/doc\/user\/tkt_mgmt.html\">\u0431\u0438\u043b\u0435\u0442 kerberos<\/a>:<\/p>\n<pre><code class=\"bash\">kinit -k -t $keytab_file $user <\/code><\/pre>\n<p>  \u0418 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 DNS \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<h3>\u041e\u0431\u0437\u043e\u0440 nsupdate-gsstsig<\/h3>\n<p>  <\/p>\n<pre><code class=\"bash\">nsupdate-gsstsig update &lt;ip&gt; &lt;hostname&gt;<\/code><\/pre>\n<h3>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 nsupdate-gsstsig<\/h3>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash ### ### \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 ### dnsserver=dc1 fwdzone=domain.local # \u0417\u043e\u043d\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. # \u041a\u043e\u043c\u0443 \u043d\u0430\u0434\u043e, \u043c\u043e\u0436\u0435\u0442 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. #revzone=115.70.10.in-addr.arpa  ttl=300 op=$1 addr=$2 #revaddr=`echo $addr | sed -re 's:([0-9]+).([0-9]+).([0-9]+).([0-9]+):4.3.2.1.in-addr.arpa:'` cn=$3 fqdn=$cn.$fwdzone addfile=add_$addr delfile=del_$addr # \u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0432 AD, # CNAME \u0438 \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 user=$cn keytab_file=.\/machine_krb5.keytab  ### ### \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438 ### MPAS=`sudo tdbdump -k SECRETS\/MACHINE_PASSWORD\/GKSM \/var\/lib\/samba\/private\/secrets.tdb | sed 's\/\\\\\\00$\/\/'`  ### ### \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c keytab-\u0444\u0430\u0439\u043b ### ktutil &lt;&lt;EOF addent -password -p $cn@DOMAIN.LOCAL -k 1 -e rc4-hmac $MPAS write_kt $keytab_file quit EOF ### ### \u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 DNS ###  addRecord() {         kinit -k -t $keytab_file $user         cat &lt;&lt;EOF &gt; $addfile gsstsig server $dnsserver zone $fwdzone update delete $fqdn a update add $fqdn $ttl a $addr send EOF #zone $revzone #update delete $revaddr ptr #update add $revaddr $ttl ptr $fqdn #send #EOF          cat &lt;&lt;EOF &gt; $delfile gsstsig server $dnsserver zone $fwdzone update delete $fqdn a send EOF #zone $revzone #update delete $revaddr ptr #send #EOF          nsupdate -v $addfile         rm -f $addfile         rm -f $delfile }  delRecord() {         kinit -k -t $keytab_file $user         nsupdate -v $delfile         rm -f $delfile }  case $op in         add|update)                 addRecord                 ;;         delete)                 delRecord                 ;;         *)                 echo &quot;Unable to handle operation $op.  Exiting&quot; exit 1 esac  rm $keytab_file<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044f \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \/bin\/nsupdate-gsstsig.<br \/>  \u0427\u0442\u043e\u0431 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 DNS \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 regdns \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0435\u0433\u043e \u0432 \/etc\/network\/if-up.d\/.<\/p>\n<h3>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 regdns<\/h3>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/sh # \u041f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e SHOST=`cat \/etc\/hostname`  # \u041f\u043e\u043c\u0435\u0449\u0430\u0435\u043c IP-\u0430\u0434\u0440\u0435\u0441 \u043d\u0435 lo \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u043f\u0435\u0440\u043c\u0435\u043d\u043d\u0443\u044e IP=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')  # \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 nsupdate-gsstsig update $IP $SHOST<\/code><\/pre>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/221843\/\">habrahabr.ru\/post\/221843<\/a><\/li>\n<li><a href=\"http:\/\/help.ubuntu.ru\/wiki\/\u0432\u0432\u043e\u0434_\u0432_\u0434\u043e\u043c\u0435\u043d_windows\">help.ubuntu.ru\/wiki\/\u0432\u0432\u043e\u0434_\u0432_\u0434\u043e\u043c\u0435\u043d_windows<\/a><\/li>\n<li><a href=\"http:\/\/forum.ubuntu.ru\/index.php?topic=17941.0\">forum.ubuntu.ru\/index.php?topic=17941.0<\/a><\/li>\n<li><a href=\"https:\/\/help.ubuntu.com\/community\/ActiveDirectoryWinbindHowto\">help.ubuntu.com\/community\/ActiveDirectoryWinbindHowto<\/a><\/li>\n<li><a href=\"http:\/\/manpages.ubuntu.com\/manpages\/trusty\/en\/man8\/net.8.html\">manpages.ubuntu.com\/manpages\/trusty\/en\/man8\/net.8.html<\/a><\/li>\n<li><a href=\"http:\/\/manpages.ubuntu.com\/manpages\/trusty\/man5\/dhclient.conf.5.html\">manpages.ubuntu.com\/manpages\/trusty\/man5\/dhclient.conf.5.html<\/a><\/li>\n<li><a href=\"http:\/\/manpages.ubuntu.com\/manpages\/trusty\/en\/man8\/tdbdump.8.html\">manpages.ubuntu.com\/manpages\/trusty\/en\/man8\/tdbdump.8.html<\/a><\/li>\n<li><a href=\"http:\/\/manpages.ubuntu.com\/manpages\/trusty\/en\/man1\/ktutil.1.html\">manpages.ubuntu.com\/manpages\/trusty\/en\/man1\/ktutil.1.html<\/a><\/li>\n<li><a href=\"http:\/\/web.mit.edu\/Kerberos\/krb5-1.12\/doc\/formats\/keytab_file_format.html\">web.mit.edu\/Kerberos\/krb5-1.12\/doc\/formats\/keytab_file_format.html<\/a><\/li>\n<li><a href=\"http:\/\/web.mit.edu\/Kerberos\/www\/krb5-devel\/doc\/user\/tkt_mgmt.html\">web.mit.edu\/Kerberos\/www\/krb5-devel\/doc\/user\/tkt_mgmt.html<\/a><\/li>\n<\/ul>\n<\/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\/265969\/\"> http:\/\/habrahabr.ru\/post\/265969\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043b\u0443\u0436\u0431\u044b <acronym>AD<\/acronym> \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u041e\u0421 Ubuntu Linux, \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043d\u0435\u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Samba, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u00abnet ads dns register\u00bb. \u0427\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043f\u0443\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u0443\u0445 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 dhclient.conf \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u00abERROR_DNS_GSS_ERROR\u00bb \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u00abnet ads dns register -P\u00bb.<\/p>\n<p>  \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0431\u0430\u0433-\u0440\u0435\u043f\u043e\u0440\u0442\u043e\u0432, \u0438 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e  <a href=\"http:\/\/habrahabr.ru\/users\/warlock_ua\/\" class=\"user_link\">Warlock_ua<\/a> <a href=\"http:\/\/habrahabr.ru\/post\/221843\/\">\u00ab\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 DNS \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 Windows \u0434\u043e\u043c\u0435\u043d\u0435 \u0438\u0437 Linux (GSS-TSIG)\u00bb<\/a>. \u0418\u0434\u0435\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439. \u041d\u043e \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 DNS-\u0437\u043e\u043d\u044b. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 Windows \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043a\u0430\u0436\u0434\u0430\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 DNS. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u044d\u0442\u0438\u043c \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f?<\/p>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b \u0441\u043a\u0440\u0438\u043f\u0442 learn-address.sh \u043e\u0442  <a href=\"http:\/\/habrahabr.ru\/users\/warlock_ua\/\" class=\"user_link\">Warlock_ua<\/a>, \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0435\u0433\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434. \u0418 \u0432\u043e\u0442 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/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-264811","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/264811","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=264811"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/264811\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=264811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=264811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=264811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}