{"id":2448644,"date":"2025-03-06T11:01:39","date_gmt":"2025-03-06T11:01:39","guid":{"rendered":"https:\/\/www.wacoca.com\/news\/2448644\/"},"modified":"2025-03-06T11:01:39","modified_gmt":"2025-03-06T11:01:39","slug":"%e7%ac%ac853%e5%9b%9e%e3%80%80samba%e3%81%a7%e4%bd%9c%e3%82%8bactive-directory%e4%ba%92%e6%8f%9b%e7%92%b0%e5%a2%83-%ef%bc%882%ef%bc%89-2%e5%8f%b0%e7%9b%ae%e3%81%ae%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3","status":"publish","type":"post","link":"https:\/\/www.wacoca.com\/news\/2448644\/","title":{"rendered":"\u7b2c853\u56de\u3000Samba\u3067\u4f5c\u308bActive Directory\u4e92\u63db\u74b0\u5883 \uff082\uff09 2\u53f0\u76ee\u306e\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u4f5c\u6210\u3068SYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u540c\u671f\u8a2d\u5b9a | gihyo.jp"},"content":{"rendered":"<p id=\"sec0_p1\">Samba\u3092\u4f7f\u3063\u305fActive Directory\uff08\u4ee5\u4e0b\u3001AD\uff09\u4e92\u63db\u74b0\u5883\u306e\u69cb\u7bc9\u65b9\u6cd5\u3092\u8907\u6570\u56de\u306b\u5206\u3051\u3066\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002\u524d\u56de\u306fSamba\u3067\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\uff08\u4ee5\u4e0b\u3001DC\uff09\u30921\u53f0\u5c55\u958b\u3057\u3001AD\u4e92\u63db\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u5197\u9577\u5316\u306e\u305f\u3081\u306b2\u53f0\u76ee\u306eDC\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n2\u53f0\u76ee\uff08\u4ee5\u964d\uff09\u306eDC\u306e\u5c55\u958b&#13;<\/p>\n<p id=\"sec1_p1\">\u307e\u305a\u306f\u4eca\u56de\u306e\u69cb\u6210\u306e\u304a\u3055\u3089\u3044\u3067\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<br \/>\n\u30c9\u30e1\u30a4\u30f3\u540d: example.com&#13;<br \/>\n&#13;<br \/>\n1\u53f0\u76ee\u306eDC\uff08\u524d\u56de\u69cb\u7bc9\u3057\u305f\u3082\u306e\u2060\uff09\u2060&#13;<br \/>\n&#13;<br \/>\n\u30db\u30b9\u30c8\u540d: samba-ad-dc01&#13;<br \/>\nIP\u30a2\u30c9\u30ec\u30b9: 192.168.1.150&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n2\u53f0\u76ee\u306eDC\uff08\u4eca\u56de\u69cb\u7bc9\u3059\u308b\u3082\u306e\u2060\uff09\u2060&#13;<br \/>\n&#13;<br \/>\n\u30db\u30b9\u30c8\u540d: samba-ad-dc02&#13;<br \/>\nIP\u30a2\u30c9\u30ec\u30b9: 192.168.1.151&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\nOS: Ubuntu Server 24.04 LTS&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p2\">2\u53f0\u76ee\uff08\u4ee5\u964d\uff09\u306eDC\u306e\u5c55\u958b\u306b\u3064\u3044\u3066\u306f1\u53f0\u76ee\u3068\u4f3c\u305f\u3068\u3053\u308d\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec1_p3\">\u307e\u305a\u3001\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306f1\u53f0\u76ee\u3068\u540c\u3058\u3067\u3059\u3002\u307e\u305f\u3001\u7121\u52b9\u306b\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u3084\/etc\/samba\/smb.conf\u306e\u524a\u9664\uff08\u79fb\u52d5\uff09\u304c\u5fc5\u8981\u306a\u306e\u3082\u540c\u3058\u3067\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo apt install -y samba-ad-dc krb5-user bind9-dnsutils&#13;<br \/>\nsamba-ad-dc02$ sudo systemctl disable &#8211;now smbd nmbd winbind&#13;<br \/>\nsamba-ad-dc02$ sudo systemctl mask smbd nmbd winbind&#13;<br \/>\nsamba-ad-dc02$ sudo rm \/etc\/samba\/smb.conf&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p4\">\/etc\/resolv.conf\u3092\u7de8\u96c6\u3057\u30011\u53f0\u76ee\u306eDC\u3092\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo unlink \/etc\/resolv.conf&#13;<br \/>\nsamba-ad-dc02$ cat &#13;<br \/>\n&gt; nameserver 192.168.1.150&#13;<br \/>\n&gt; search example.com&#13;<br \/>\n&gt; EOF&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p5\">\u4e8b\u524d\u6e96\u5099\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30c9\u30e1\u30a4\u30f3\u306bDC\u3068\u3057\u3066\u53c2\u52a0\u3057\u307e\u3059\u3002\u6b21\u306fAdministrator@example.com\u306e\u6a29\u9650\u3067example.com\u30c9\u30e1\u30a4\u30f3\u306bDC\u3068\u3057\u3066\u53c2\u52a0\u3059\u308b\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo samba-tool domain join example.com DC -U &#8216;Administrator@example.com&#8217;&#13;<br \/>\n&#8230;&#13;<br \/>\nINFO 2025-02-25 13:12:29,011 pid:3843 \/usr\/lib\/python3\/dist-packages\/samba\/join.py #106: Finding a writeable DC for domain &#8216;example.com&#8217;&#13;<br \/>\nINFO 2025-02-25 13:12:29,015 pid:3843 \/usr\/lib\/python3\/dist-packages\/samba\/join.py #108: Found DC samba-ad-dc01.example.com&#13;<br \/>\nPassword for [Administrator@example.com]:&#13;<br \/>\n&#8230;&#13;<br \/>\nINFO 2025-02-25 13:12:32,248 pid:3843 \/usr\/lib\/python3\/dist-packages\/samba\/provision\/__init__.py #2432: A Kerberos configuration suitable for Samba AD has been generated at \/var\/lib\/samba\/private\/krb5.conf&#13;<br \/>\nINFO 2025-02-25 13:12:32,248 pid:3843 \/usr\/lib\/python3\/dist-packages\/samba\/provision\/__init__.py #2434: Merge the contents of this file with your system krb5.conf or replace it with this one. Do not create a symlink!&#13;<br \/>\n&#8230;&#13;<br \/>\nINFO 2025-02-25 13:12:34,681 pid:3843 \/usr\/lib\/python3\/dist-packages\/samba\/join.py #1631: Joined domain EXAMPLE (SID S-1-5-21-1227575069-1623886296-1303063441) as a DC&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p6\">\u307e\u305f\u3001\u3053\u308c\u30821\u53f0\u76ee\u540c\u69d8\u3067\u3059\u304c\u30ed\u30b0\u306e\u629c\u7c8b\u7b87\u6240\u3067\u6307\u793a\u304c\u3042\u308b\u3088\u3046\u306b\u3001\/etc\/krb5.conf\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo cp -f \/var\/lib\/samba\/private\/krb5.conf \/etc\/krb5.conf&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p7\">\u4f5c\u6210\u3055\u308c\u305f\/etc\/samba\/smb.conf\u3092\u898b\u308b\u3068\u3001DNS\u30d5\u30a9\u30ef\u30fc\u30c0\u30fc\u306a\u3069\u30011\u53f0\u76ee\u306eAD\u3068\u8a2d\u5b9a\u304c\u63c3\u3063\u3066\u3044\u306a\u3044\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u3002DC\u540c\u58eb\u306f\u540c\u3058\u8a2d\u5b9a\u3092\u6301\u3064\u3079\u304d\u3067\u3042\u308b\u305f\u3081\u3001\u6b21\u306e\u3088\u3046\u306b1\u53f0\u76ee\u3068\u5185\u5bb9\u3092\u63c3\u3048\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ cat \/etc\/samba\/smb.conf&#13;<br \/>\n# Global parameters&#13;<br \/>\n[global]&#13;<br \/>\n        dns forwarder = 192.168.1.1     # \u8ffd\u52a0&#13;<br \/>\n        netbios name = SAMBA-AD-DC02&#13;<br \/>\n        realm = EXAMPLE.COM&#13;<br \/>\n        server role = active directory domain controller&#13;<br \/>\n        workgroup = EXAMPLE&#13;<br \/>\n        idmap_ldb:use rfc2307 = yes     # \u8ffd\u52a0&#13;<br \/>\n&#13;<br \/>\n[sysvol]&#13;<br \/>\n        path = \/var\/lib\/samba\/sysvol&#13;<br \/>\n        read only = No&#13;<br \/>\n&#13;<br \/>\n[netlogon]&#13;<br \/>\n        path = \/var\/lib\/samba\/sysvol\/example.com\/scripts&#13;<br \/>\n        read only = No&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p8\">\u305d\u3057\u3066\u30011\u53f0\u76ee\u540c\u69d8\u3001systemd-resolved\u3092\u7121\u52b9\u5316\u30fb\u505c\u6b62\u3057\u3066\u3001Samba AD DC\u30b5\u30fc\u30d3\u30b9\u3092\u6709\u52b9\u5316\u30fb\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo systemctl disable systemd-resolved &#8211;now&#13;<br \/>\nsamba-ad-dc02$ sudo systemctl enable samba-ad-dc &#8211;now&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_p9\">2\u53f0\u76ee\u306eDC\u306e\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ kinit Administrator&#13;<br \/>\nPassword for Administrator@EXAMPLE.COM:&#13;<br \/>\nWarning: Your password will expire in 41 days on Mon 07 Apr 2025 02:04:04 PM UTC&#13;<br \/>\nsamba-ad-dc02$ klist&#13;<br \/>\nTicket cache: FILE:\/tmp\/krb5cc_1000&#13;<br \/>\nDefault principal: Administrator@EXAMPLE.COM&#13;<br \/>\n&#13;<br \/>\nValid starting       Expires              Service principal&#13;<br \/>\n02\/25\/2025 13:13:56  02\/25\/2025 23:13:56  krbtgt\/EXAMPLE.COM@EXAMPLE.COM&#13;<br \/>\n        renew until 02\/26\/2025 13:13:54&#13;<br \/>\n&#13;<br \/>\nsamba-ad-dc02$ for srv in _ldap._tcp _kerberos._tcp _kerberos._udp _kpasswd._udp; do echo -n &#8220;${srv}.example.com: &#8220;; dig @localhost +short -t SRV ${srv}.example.com; done&#13;<br \/>\n_ldap._tcp.example.com: 0 100 389 samba-ad-dc01.example.com.&#13;<br \/>\n0 100 389 samba-ad-dc02.example.com.&#13;<br \/>\n_kerberos._tcp.example.com: 0 100 88 samba-ad-dc01.example.com.&#13;<br \/>\n0 100 88 samba-ad-dc02.example.com.&#13;<br \/>\n_kerberos._udp.example.com: 0 100 88 samba-ad-dc01.example.com.&#13;<br \/>\n0 100 88 samba-ad-dc02.example.com.&#13;<br \/>\n_kpasswd._udp.example.com: 0 100 464 samba-ad-dc01.example.com.&#13;<br \/>\n0 100 464 samba-ad-dc02.example.com.&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_pa\">\u307e\u305f\u3001\u4e0a\u3067\u898b\u3089\u308c\u308b\u3088\u3046\u306b2\u53f0\u76ee\u306eDC\u3082DNS\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u4eca\u5f8c\u306f2\u53f0\u76ee\u306eDC\u3082\u81ea\u8eab\u306eDNS\u30b5\u30fc\u30d0\u30fc\u3067\u540d\u524d\u89e3\u6c7a\u3055\u305b\u3089\u308c\u308b\u3088\u3046\u3001\u6700\u5f8c\u306b\/etc\/resolv.conf\u3092\uff08\u518d\uff09\u7de8\u96c6\u3057\u307e\u3059[1]\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ cat &#13;<br \/>\n&gt; nameserver 127.0.0.1&#13;<br \/>\n&gt; search example.com&#13;<br \/>\n&gt; EOF&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_pb\">\u30c9\u30e1\u30a4\u30f3\u306b\u3059\u3067\u306b\u53c2\u52a0\u3057\u3066\u3044\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306f2\u53f0\u76ee\u306eDC\u3082DNS\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u53c2\u7167\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec1_pc\">[1] \u3061\u306a\u307f\u306b\u3001DC\u304c\u53c2\u7167\u3059\u308bDNS\u30b5\u30fc\u30d0\u30fc\u306b\u3064\u3044\u3066\u306f\u3001\u305d\u306eDC\u81ea\u4f53\u306b\u3059\u308b\u306e\u304b\u30011\u3064\u306eDC\u3092\u3059\u3079\u3066\u53c2\u7167\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u306e\u304b\u3068\u3044\u3046\u9078\u629e\u80a2\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u305d\u308c\u305e\u308c\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3001DC\u306f\u5404\u3005\u304c\u6301\u3064DNS\u30b5\u30fc\u30d0\u30fc\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u3046\u69cb\u6210\u3092\u53d6\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<br \/>\nSYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8&#13;<\/p>\n<p id=\"sec2_p1\">\u30c9\u30e1\u30a4\u30f3\u306b\u53c2\u52a0\u3057\u305f\u6642\u70b9\u3067\u30011\u53f0\u76ee\u306eDC\u304b\u30892\u53f0\u76ee\u306eDC\u306b\u30c9\u30e1\u30a4\u30f3\u306e\u30e6\u30fc\u30b6\u30fc\u3084\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306a\u3069\u306eLDAP\u306e\u60c5\u5831\u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059[2]\u3002\u4e00\u65b9\u3001\u30b0\u30eb\u30fc\u30d7\u30dd\u30ea\u30b7\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08GPO\uff09\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u53ce\u3081\u3089\u308c\u3066\u3044\u308bSYSVOL\u30d5\u30a9\u30eb\u30c0\u306fSamba AD DC\u3067\u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3055\u308c\u307e\u305b\u3093[3]\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_p2\">\u72b6\u6cc1\u8aac\u660e\u306e\u305f\u3081\u3001\u672c\u5bb6\u306eWindows Server\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d3\u30b9\uff08ADDS\uff09\u306e\u5834\u5408\u306f\u3069\u3046\u304b\u3068\u3044\u3046\u3068\u3001Distributed File System Replication(DFS Replication\u3042\u308b\u3044DFSR)\u3068\u3044\u3046\u6a5f\u80fd\u306b\u3088\u308aDC\u9593\u3067SYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u5185\u5bb9\u304c\uff08\u53cc\u65b9\u5411\u306b\uff09\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001Samba\u3067\u306fDFSR\u306e\u4e92\u63db\u6a5f\u80fd\u304c\u672a\u5b9f\u88c5\u3068\u3044\u3046\u72b6\u6cc1\u3067\u3059[4]\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p3\">[2] \u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306f\u524d\u56de\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fWindows Server\u306e\u30ea\u30e2\u30fc\u30c8\u7ba1\u7406\u7528\u30c4\u30fc\u30eb\u306b\u542b\u307e\u308c\u308b\u300cActive Directory \u30e6\u30fc\u30b6\u30fc\u3068\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u300d\u3092\u4f7f\u3046\u3053\u3068\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u300c\u2060example.com\u300d\u3068\u3044\u3046\u30c9\u30e1\u30a4\u30f3\u540d\u306e\u4e0a\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u300c\u30c9\u30e1\u30a4\u30f3 \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u5909\u66f4\u300d\u3068\u3044\u3046\u9805\u76ee\u304c\u3042\u308b\u306e\u3067\u305d\u308c\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u3053\u306e\u30c4\u30fc\u30eb\u3067\u73fe\u5728\u53c2\u7167\u3057\u3066\u3044\u308bDC\u306e\u8868\u793a\u3068DC\u306e\u5207\u308a\u66ff\u3048\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p4\">[3] GPO\u306b\u3064\u3044\u3066\u306f\u7b2c836\u56de\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p5\">[4] \u5b9f\u969b\u306e\u52d5\u4f5c\u3092\u898b\u308b\u3068\u3001DFS&#8221;R&#8221;\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\u3060\u3051\u3067\u3001SYSVOL\u30d5\u30a9\u30eb\u30c0\u3092DFS\u3068\u3057\u3066\u516c\u958b\u306f\u3067\u304d\u3066\u3044\u308b\u72b6\u6cc1\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p6\">\u5b9f\u969b\u306b\u78ba\u8a8d\u3057\u3066\u307f\u308b\u30681\u53f0\u76ee\u306eDC\u306b\u306fPolicies\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308a\u307e\u3059\u304c\u30012\u53f0\u76ee\u306eDC\u306b\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc01$ sudo ls -la \/var\/lib\/samba\/sysvol\/example.com&#13;<br \/>\ntotal 32&#13;<br \/>\ndrwxrwx&#8212;+ 4 root BUILTIN\\administrators 4096 Nov 29 04:47 .&#13;<br \/>\ndrwxrwx&#8212;+ 3 root BUILTIN\\administrators 4096 Nov 29 04:47 ..&#13;<br \/>\ndrwxrwx&#8212;+ 4 root BUILTIN\\administrators 4096 Nov 29 04:47 Policies&#13;<br \/>\ndrwxrwx&#8212;+ 2 root BUILTIN\\administrators 4096 Nov 29 04:47 scripts&#13;<br \/>\n&#13;<br \/>\nsamba-ad-dc02$ sudo ls -la \/var\/lib\/samba\/sysvol\/example.com&#13;<br \/>\ntotal 12&#13;<br \/>\ndrwxr-xr-x 3 root root 4096 Dec  1 05:35 .&#13;<br \/>\ndrwxr-xr-x 3 root root 4096 Dec  1 05:35 ..&#13;<br \/>\ndrwxr-xr-x 2 root root 4096 Dec  1 05:35 scripts&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p7\">\u3064\u307e\u308a\u3001\u63a5\u7d9a\u3059\u308bDC\u306b\u3088\u3063\u3066SYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u8eab\uff08\u2252GPO\u95a2\u9023\u306e\u60c5\u5831\uff09\u304c\u9055\u3046\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001DC\u30922\u53f0\u69cb\u6210\u306b\u3057\u3066\u3044\u308b\u7406\u7531\u306f\u5197\u9577\u5316\u306e\u305f\u3081\u306a\u306e\u3067\u3001SYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u5185\u5bb9\u3082\u540c\u671f\u3055\u308c\u3066\u3044\u3066\u307b\u3057\u3044\u3068\u3053\u308d\u3067\u3059[5]\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p8\">[5] \u5b9f\u7528\u4e0a\u306e\u554f\u984c\u3082\u8d77\u3053\u308a\u5f97\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u672c\u9023\u8f09\u3067\u3082\u7d39\u4ecb\u3057\u305fadsys\u3067GPO\u306e\u66f4\u65b0\u304c\u3042\u3063\u305f\u304b\u3092\u78ba\u8a8d\u3059\u308b\u5148\u3068\u306a\u308bDC\u306f\u30e9\u30f3\u30c0\u30e0\u306b\u9078\u3070\u308c\u308b\u305f\u3081\u3001\u3053\u306e\u307e\u307e\u3060\u3068\u30e9\u30f3\u30c0\u30e0\u306bGPO\u304c\u9069\u7528\u3055\u308c\u305f\u308a\u3055\u308c\u306a\u304b\u3063\u305f\u308a\u3068\u3044\u3046\u72b6\u6cc1\u3068\u306a\u308a\u56f0\u3063\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_p9\">\u3053\u306e\u72b6\u6cc1\u306b\u5bfe\u3057\u3001Samba\u306e\u516c\u5f0fWiki\u3067\u306f\u56de\u907f\u7b56\u306e1\u3064\u3068\u3057\u3066\u300cPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u3092\u6301\u3064DC\u3067rsyncd\u3092\u7a3c\u50cd\u3055\u305b\u3066\u3001\u4ed6\u306eDC\u304b\u3089rsync\u3067SYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u5185\u5bb9\u3092\u4e00\u65b9\u5411\u306b\u540c\u671f\u3059\u308b\u300d\u3068\u3044\u3046\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u3002\u30b7\u30f3\u30d7\u30eb\u306a\u65b9\u6cd5\u306a\u306e\u3067\u672c\u7a3f\u3067\u3082\u3053\u308c\u3092\u63a1\u7528\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u306a\u304a\u3001GPO\u3092\u4e00\u5207\u4f7f\u308f\u306a\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u672c\u7bc0\u306e\u4f5c\u696d\u306f\u4e0d\u8981\u3067\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pa\">\u305d\u306e\u524d\u306b\u3001\u300c\u2060PDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u300d\u3068\u3044\u3046\u8a00\u8449\u304c\u5510\u7a81\u306b\u51fa\u3066\u304d\u307e\u3057\u305f\u3002AD\u306b\u99b4\u67d3\u307f\u306e\u306a\u3044\u65b9\u306e\u305f\u3081\u306b\u3001\u3053\u306e\u8a00\u8449\u3092\u69cb\u6210\u8981\u7d20\u3054\u3068\u306b\u5206\u89e3\u3057\u3066\u9806\u756a\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pb\">\u307e\u305a\u306f\u300cFSMO\u30ed\u30fc\u30eb\u300d\u3067\u3059\u3002AD\u306f\u300c\u30de\u30eb\u30c1\u30de\u30b9\u30bf\u30fc\u5bfe\u5fdc\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u300d\u3067\u3042\u308a\u3001\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4fdd\u6301\u3059\u308bDC\u540c\u58eb\u306f\u672c\u6765\u5bfe\u7b49\u306a\u7acb\u5834\u3068\u3044\u3048\u307e\u3059\u3002\u305f\u3060\u3001\u5bfe\u7b49\u3060\u304b\u3089\u3068\u3044\u3063\u3066\u500b\u5225\u306eDC\u306b\u5bfe\u3057\u3066\u4e00\u6589\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u66f4\u65b0\u3092\u304b\u3051\u308b\u3068\u305d\u308c\u306f\u305d\u308c\u3067\u64cd\u4f5c\u306e\u7af6\u5408\uff08\u4e0d\u6574\u5408\uff09\u304c\u767a\u751f\u3059\u308b\u30ea\u30b9\u30af\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001AD\u3067\u306f\u4e00\u90e8\u306e\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u300c\u5358\u4e00\u30de\u30b9\u30bf\u30fc\u30e2\u30c7\u30eb\u300d\u3092\u3068\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u64cd\u4f5c\u30b0\u30eb\u30fc\u30d7\u3054\u3068\u306b\u300cFSMO(Flexible Single Master Operation)\u30ed\u30fc\u30eb\u300d\u3068\u3044\u3046\u3082\u306e\u30921\u53f0\u306eDC\u306b\u5272\u308a\u5f53\u3066\u3001\u305d\u306e\u64cd\u4f5c\u306f\u3053\u306e\u30ed\u30fc\u30eb\u3092\u6301\u3064DC\u3060\u3051\u304c\u304a\u3053\u306a\u3046\u3068\u3044\u3046\u30eb\u30fc\u30eb\u3067\u3001\u64cd\u4f5c\u306e\u7af6\u5408\uff08\u4e0d\u6574\u5408\uff09\u3092\u56de\u907f\u3057\u307e\u3059\u3002FSMO\u30ed\u30fc\u30eb\u306f\u7279\u5b9aDC\u306b\u56fa\u5b9a\u3055\u308c\u3066\u304a\u3089\u305a\uff08\u3086\u3048\u306b&#8221;Flexible&#8221;\u2060\uff09\u2060\u3001\u9069\u5b9c\u3001\u8ee2\u9001\uff08\u5f37\u5236\u8ee2\u9001\u542b\u3080\uff09\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pc\">\u7d9a\u3044\u3066\u3001\u300c\u2060PDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u300d\u3067\u3059\u3002AD\u306e\u524d\u8eab\u3067\u3042\u308bNT\u30c9\u30e1\u30a4\u30f3\u3067\u306f\u30d7\u30e9\u30a4\u30de\u30eaDC\uff08PDC\uff09\u3068\u3044\u3046\u3082\u306e\u304c1\u53f0\u8a2d\u5b9a\u3055\u308c\u3066\u539f\u672c\u3068\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u6301\u3061\u3001\u6b8b\u308a\u306eDC\u306f\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b3\u30d4\u30fc\u3092\u6301\u3064\u30d0\u30c3\u30af\u30a2\u30c3\u30d7DC\uff08BDC\uff09\u3068\u4f4d\u7f6e\u3065\u3051\u3089\u308c\u3066\u3044\u307e\u3057\u305f\u3002NT\u30c9\u30e1\u30a4\u30f3\u306e\u5f8c\u7d99\u3067\u3042\u308bAD\u306f\u524d\u8ff0\u306e\u901a\u308a\u300c\u30de\u30eb\u30c1\u30de\u30b9\u30bf\u30fc\u578b\u300d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u305f\u3081\u3001DC\u540c\u58eb\u306f\u5bfe\u7b49\u3067\u3001PDC\/BDC\u3068\u3044\u3046\u8003\u3048\u65b9\u306f\u57fa\u672c\u7684\u306b\u3042\u308a\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\uff08\u2060\u7279\u306b\u904e\u6e21\u671f\u306b\u304a\u3044\u3066\uff09\u5f8c\u65b9\u4e92\u63db\u6027\u3092\u7dad\u6301\u3059\u308b\u305f\u3081\u306b\u3001AD\u306b\u306fNT\u30c9\u30e1\u30a4\u30f3\u306e\u3088\u3046\u306b\u3082\u632f\u308b\u821e\u3046\u3053\u3068\u3082\u6c42\u3081\u3089\u308c\u307e\u3057\u305f\u3002\u305d\u306e\u7d50\u679c\u3068\u3057\u3066\u751f\u307e\u308c\u305f\u306e\u304cNT\u30c9\u30e1\u30a4\u30f3\u6642\u4ee3\u306ePDC\u306e\u3088\u3046\u306b\u632f\u308b\u821e\u3046=\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u300cPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u300d\u3068\u3044\u3046FSMO\u30ed\u30fc\u30eb\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u300c\u2060PDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u300d\u3068\u306f\u3001\u539f\u7fa9\u7684\u306b\u306f\u300cNT\u30c9\u30e1\u30a4\u30f3\u3060\u3068\u601d\u3063\u3066AD\u30c9\u30e1\u30a4\u30f3\u306b\u63a5\u7d9a\u3057\u3066\u304f\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306bPDC\u3092\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u5f79\u56de\u308a\u3092\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308bDC\u300d\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pd\">\u305f\u3060\u3001\u5b9f\u969b\u306b\u306f\u300cPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u300d\u3092\u6301\u3064DC\u306f\u306a\u306b\u304b\u306b\u3064\u3051\u3066\u91cd\u8981\u306a\u5f79\u56de\u308a\u3092\u62c5\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u3044\u3068\u3044\u3046\u7406\u89e3\u3067\u3059\u3002\u305d\u306e1\u3064\u304c\u300c&#8221;\u30b0\u30eb\u30fc\u30d7 \u30dd\u30ea\u30b7\u30fc\u7ba1\u7406\u30a8\u30c7\u30a3\u30bf\u30fc&#8221;\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u3092\u6301\u3064DC\u306b\u63a5\u7d9a\u3059\u308b\u300d\u3068\u3044\u3046\u3082\u306e\u3067\u3059[6]\u3002\u3053\u308c\u3092\u4eca\u56de\u306e\u56de\u907f\u7b56\u306e\u89b3\u70b9\u3067\u898b\u308b\u3068\u3001\u300c\u2060\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u307e\u305a\u6700\u521d\u306bPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u3092\u6301\u3064DC\u304c\u62b1\u3048\u308bSYSVOL\u30d5\u30a9\u30eb\u30c0\u306bGPO\u306e\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u308b\uff08\u305d\u3057\u3066\u3001ADDS\u306e\u5834\u5408\u306f\u305d\u306e\u5909\u66f4\u5185\u5bb9\u304cDFSR\u3067\u4ed6\u306eDC\u306b\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3055\u308c\u308b\u2060\uff09\u2060\u300d\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pe\">[6] Windows Group Policy: Deploying Group Policy, Information on rsync-based replication\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pf\">\u4eca\u56de\u306f\u524d\u8ff0\u306e\u901a\u308a\u30011\u53f0\u76ee\u306eDC\u304b\u30892\u53f0\u76ee\u306eDC\u306e\u4e00\u65b9\u5411\u306bSYSVOL\u30d5\u30a9\u30eb\u30c0\u3092\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3059\u308b\u3053\u3068\u3067\u3001DFSR\u3092\u4f7f\u308f\u305a\u306b\u540c\u69d8\u306e\u3053\u3068\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001DFSR\u304c\u53cc\u65b9\u5411\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306a\u306e\u306b\u5bfe\u3057\u3001\u3053\u306e\u65b9\u5f0f\u306f\u4e00\u65b9\u5411\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u306a\u308b\u305f\u3081\u3001\u6b21\u306e\u3088\u3046\u306a\u524d\u63d0\u30fb\u60f3\u5b9a\uff08\u3042\u308b\u3044\u306f\u3001\u5236\u9650\u30fb\u5236\u7d04\uff09\u306e\u4e0b\u3067\u30c9\u30e1\u30a4\u30f3\u306e\u904b\u7528\u3092\u304a\u3053\u306a\u3044\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<br \/>\n\u57fa\u672c\u7684\u306b\u306f1\u53f0\u76ee\u306eDC\u306bPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u3092\u3082\u305f\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u3002&#13;<br \/>\nGPO\u306e\u7ba1\u7406\u8005\u306fPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u3092\u6301\u3064DC\u306b\u63a5\u7d9a\u3057\u3066\uff08\u2060\u300c\u2060\u30b0\u30eb\u30fc\u30d7 \u30dd\u30ea\u30b7\u30fc\u7ba1\u7406\u30a8\u30c7\u30a3\u30bf\u30fc\u300d\u306e\u5834\u5408\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6319\u52d5\u306e\u307e\u307e\u64cd\u4f5c\u3057\u3066\u2060\uff09\u2060\u3001GPO\u95a2\u9023\u306e\u64cd\u4f5c\u3092\u3059\u308b\u3002&#13;<br \/>\nPDC\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fcFSMO\u30ed\u30fc\u30eb\u3092\u79fb\u52d5\u3055\u305b\u308b\u3068\u304d\u306fSYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u3082\u9069\u5b9c\u5bfe\u5fdc\uff08\u4f8b\uff1a\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u65b9\u5411\u3092\u5909\u3048\u308bor\u505c\u6b62\u3059\u308b\u3068\u3044\u3063\u305f\u5bfe\u5fdc\uff09\u3092\u53d6\u308b\u3002&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pg\">\u524d\u7f6e\u304d\u304c\u9577\u304f\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u8a2d\u5b9a\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_ph\">\u307e\u305a\u306f\u30011\u53f0\u76ee\u306eDC\u5074\u306e\u8a2d\u5b9a\u3067\u3059\u3002\u6b21\u306e\u3088\u3046\u306a\u5185\u5bb9\u3067rsyncd\u3092\u69cb\u6210\u3001\u52d5\u4f5c\u3055\u305b\u307e\u3059[7]\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc01$ cat &#13;<br \/>\n[SYSVOL]&#13;<br \/>\npath = \/var\/lib\/samba\/sysvol&#13;<br \/>\nhosts allow = 192.168.1.151 # \u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u5148\u306eDC\u306eIP\u30a2\u30c9\u30ec\u30b9&#13;<br \/>\nhosts deny = *&#13;<br \/>\nlist = true&#13;<br \/>\nuid = root&#13;<br \/>\ngid = root&#13;<br \/>\nread only = yes&#13;<br \/>\nauth users = sysvol-replication&#13;<br \/>\nsecrets file = \/etc\/samba\/rsyncd.secret&#13;<br \/>\nEOF&#13;<br \/>\n&#13;<br \/>\nsamba-ad-dc01$ cat &#13;<br \/>\nsysvol-replication:P@ssw0rd&#13;<br \/>\nEOF&#13;<br \/>\n&#13;<br \/>\nsamba-ad-dc01$ sudo chmod 600 \/etc\/samba\/rsyncd.secret   # \u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a&#13;<br \/>\n&#13;<br \/>\nsamba-ad-dc01$ sudo systemctl enable rsync.service &#8211;now # rsyncd\u306e\u6709\u52b9\u5316\u30fb\u8d77\u52d5&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pi\">[7] rsyncd\u3092\u4f7f\u3046\u305f\u3081\u3001\u901a\u4fe1\u5185\u5bb9\u306f\u6697\u53f7\u5316\u3055\u308c\u307e\u305b\u3093\u3002\u3068\u306f\u3044\u3048\u3001\u901a\u5e38\u3001SYSVOL\u30d5\u30a9\u30eb\u30c0\u306b\u8997\u304d\u898b\u3055\u308c\u3066\u56f0\u308b\u3082\u306e\u306f\u57fa\u672c\u7684\u306b\u306f\u306a\u3044\u3068\u3055\u308c\u3066\u3044\u307e\u3059\uff08\u305d\u3082\u305d\u3082\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306fSYSVOL\u30d5\u30a9\u30eb\u30c0\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066GPO\u3084\u30a2\u30bb\u30c3\u30c8\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u2060\uff09\u2060\u3002\u307e\u305f\u3001\u8aad\u307f\u53d6\u308a\u5c02\u7528\u3067\u516c\u958b\u3057\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308a\u3001\u3053\u306e\u3088\u3046\u306a\u5272\u308a\u5207\u3063\u305f\u5b9f\u88c5\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u901a\u4fe1\u3092\u6697\u53f7\u5316\u3057\u305f\u3044\u3088\u3046\u3067\u3042\u308c\u3070SSH\u30c8\u30f3\u30cd\u30eb\u3092\u901a\u3057\u3066\uff08\u666e\u6bb5\u3088\u304f\u3084\u308b\u3088\u3046\u306b\uff09rsync\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3001\/var\/lib\/samba\/sysvol\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u8aad\u307f\u66f8\u304d\u306b\u306f\u901a\u5e38\u3001root\u6a29\u9650\u304c\u5fc5\u8981\u3067\u3042\u308a\u3001root\u30e6\u30fc\u30b6\u30fc\u3067SSH\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u306a\u3069\u306e\u5bfe\u5fdc\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u3053\u308c\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7684\u306b\u60a9\u307e\u3057\u3044\u3068\u3053\u308d\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pj\">\u307e\u305f\u3001SYSVOL\u30d5\u30a9\u30eb\u30c0\u306fSMB\/CIFS\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3068\u3057\u3066\u898b\u3048\u308b\u305f\u3081\u3001Windows\u306e\u30e6\u30fc\u30b6\u30fc\u30fb\u30b0\u30eb\u30fc\u30d7\u7ba1\u7406\u3067\u4f7f\u7528\u3055\u308c\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8b58\u5225\u5b50\uff08SID\uff09\u3068\u3044\u3046\u3082\u306e\u3068Linux\u306e\u30e6\u30fc\u30b6\u30fc\u30fb\u30b0\u30eb\u30fc\u30d7\u7ba1\u7406\u3067\u4f7f\u7528\u3055\u308c\u308bUID\/GID\u3068\u3067\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Samba AD DC\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3046\u3061\u3053\u306eID\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u53ce\u3081\u3066\u3044\u308b\u306e\u304cidmap.ldb\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u3067\u3059\u304c\u3001\u540c\u3058\u30c9\u30e1\u30a4\u30f3\u306eDC\u9593\u3067\u3082\u30d3\u30eb\u30c8\u30a4\u30f3\u306e\u30e6\u30fc\u30b6\u30fc\u30fb\u30b0\u30eb\u30fc\u30d7\u306b\u3064\u3044\u3066\u3001SID\u3068UID\/GID\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u304c\u63c3\u3046\u3053\u3068\u306f\u4fdd\u8a3c\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3053\u306eID\u30de\u30c3\u30d4\u30f3\u30b0\u306bDC\u9593\u3067\u5dee\u7570\u304c\u3042\u308b\u3068\u3001\u610f\u56f3\u3057\u306a\u3044\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\u3057\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u30011\u53f0\u76ee\u306eDC\u304b\u3089idmap.ldb\u3092\u53d6\u5f97\u3057\u30012\u53f0\u76ee\u306eDC\u3068\u540c\u671f\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pk\">\u307e\u305a\u306f\u6e96\u5099\u3068\u3057\u3066\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u30671\u53f0\u76ee\u306eDC\u304b\u3089idmap.ldb\u3092\u53d6\u5f97\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc01$ sudo tdbbackup -s .bak \/var\/lib\/samba\/private\/idmap.ldb&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pl\">\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\/var\/lib\/samba\/private\/idmap.ldb.bak\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u3053\u308c\u30922\u53f0\u76ee\u306eDC\u306e\u4efb\u610f\u306e\u5834\u6240\u306b\u4efb\u610f\u306e\u65b9\u6cd5\u3067\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u3053\u308c\u3067\u30011\u53f0\u76ee\u306e\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pm\">\u7d9a\u3044\u30662\u53f0\u76ee\u306eDC\u5074\u306e\u8a2d\u5b9a\u3067\u3059\u3002\u5148\u307b\u3069\u30b3\u30d4\u30fc\u3057\u3066\u304d\u305fidmap.ldb\u30672\u53f0\u76ee\u306eDC\u306eidmap.ldb\u3092\u4e0a\u66f8\u304d\u3057\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30af\u30ea\u30a2\u3057\u3066ID\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u540c\u671f\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo cp idmap.ldb.bak \/var\/lib\/samba\/private\/idmap.ldb&#13;<br \/>\nsamba-ad-dc02$ sudo net cache flush&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pn\">\u3053\u308c\u3067DC\u9593\u306eSID\u3068UID\/GID\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u304c\u63c3\u3044\u307e\u3057\u305f[8]\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_po\">[8] Samba\u306e\u516c\u5f0fWiki\u3067\u306f\u3053\u306e\u540c\u671f\u4f5c\u696d\u306f\u300c\u6bce\u56de\u3067\u306a\u3044\u306b\u305b\u3088\u5b9a\u671f\u7684\u306b\u5b9f\u65bd\u3059\u3079\u304d\u300d\u3068\u8a18\u8f09\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3060\u3001\u7b46\u8005\u500b\u4eba\u306e\u898b\u89e3\u3068\u3057\u3066\u306f\u3001SYSVOL\u30d5\u30a9\u30eb\u30c0\u3092\u64cd\u4f5c\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306f\u9650\u3089\u308c\u3066\u3044\u308b\uff08\u2252\u5909\u52d5\u304c\u5c11\u306a\u3044\uff09\u3068\u8003\u3048\u3089\u308c\u308b\u305f\u3081\u3001\u305d\u3053\u307e\u3067\u983b\u7e41\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u540c\u671f\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pp\">\u7d9a\u3044\u3066\u3001rsync\u30b3\u30de\u30f3\u30c9\u30671\u53f0\u76ee\u306eDC\u3078\u63a5\u7d9a\u3059\u308b\u969b\u306b\u4f7f\u7528\u3059\u308b\u8a8d\u8a3c\u60c5\u5831\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ cat &#13;<br \/>\nP@ssw0rd&#13;<br \/>\nEOF&#13;<br \/>\nsamba-ad-dc02$ sudo chmod 600 \/etc\/samba\/rsync-sysvol.secret&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pq\">SYSVOL\u30d5\u30a9\u30eb\u30c0\u306e\u540c\u671f\u3092\u304a\u3053\u306a\u3046\u30b5\u30fc\u30d3\u30b9\u30e6\u30cb\u30c3\u30c8[9]\u3068\u305d\u308c\u3092\u5b9a\u671f\u7684\uff085\u5206\u304a\u304d\uff09\u306b\u30c8\u30ea\u30ac\u30fc\u3059\u308b\u30bf\u30a4\u30de\u30fc\u30e6\u30cb\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ cat &#13;<br \/>\n[Unit]&#13;<br \/>\nDescription=SYSVOL synchronization service&#13;<br \/>\n&#13;<br \/>\n[Service]&#13;<br \/>\nExecStart=\/usr\/bin\/rsync -XAavz &#8211;delete-after &#8211;password-file=\/etc\/samba\/rsync-sysvol.secret rsync:\/\/sysvol-replication@192.168.1.150\/SYSVOL \/var\/lib\/samba\/sysvol&#13;<br \/>\nEOF&#13;<br \/>\n&#13;<br \/>\nsamba-ad-dc02$ cat &#13;<br \/>\n[Unit]&#13;<br \/>\nDescription=Synchronize SYSVOL every 5 minutes&#13;<br \/>\n&#13;<br \/>\n[Timer]&#13;<br \/>\nOnBootSec=5min&#13;<br \/>\nOnUnitActiveSec=5min&#13;<br \/>\n&#13;<br \/>\n[Install]&#13;<br \/>\nWantedBy=timers.target&#13;<br \/>\nEOF&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pr\">[9] \u300c\u2060\u540c\u671f\u306e\u65b9\u5411\u3092\u9593\u9055\u3048\u3066SYSVOL\u30d5\u30a9\u30eb\u30c0\u304c\u307e\u3063\u3055\u3089\u306b\u30af\u30ea\u30a2\u3055\u308c\u305f\u300d\u3068\u3044\u3063\u305f\u53ef\u80fd\u6027\u3082\u3042\u308b\u305f\u3081\u3001\u5b9f\u5834\u9762\u3067\u306f\u5b9f\u969b\u306b\u540c\u671f\u3059\u308b\u524d\u306b&#8211;dry-run\u30aa\u30d7\u30b7\u30e7\u30f3\u3064\u304d\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u671f\u5f85\u3057\u305f\u7d50\u679c\u304c\u5f97\u3089\u308c\u308b\u304b\u3092\u7cbe\u67fb\u3059\u308b\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_ps\">\u6700\u5f8c\u306b\u30e6\u30cb\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30ed\u30fc\u30c9\u3057\u3001\u30bf\u30a4\u30de\u30fc\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\nsamba-ad-dc02$ sudo systemctl daemon-reload&#13;<br \/>\nsamba-ad-dc02$ sudo systemctl enable sysvol-replication.timer &#8211;now&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pt\">\u3053\u308c\u3067SYSVOL\u30d5\u30a9\u30eb\u30c0\u304c1\u53f0\u76ee\u306eDC\u304b\u30892\u53f0\u76ee\u306eDC\u306b\u5b9a\u671f\u7684\u306b\u30ec\u30d7\u30ea\u30b1\u30fc\u30c8\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002Ubuntu\u30de\u30b7\u30f3\u3067\u3042\u308c\u3070adsys\u3092\u4f7f\u3063\u3066GPO\u3092\u9069\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&#13;<\/p>\n<p id=\"sec2_pu\">\u306a\u304a\u30012\u53f0\u76ee\u4ee5\u964d\u306eDC\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u3082\u540c\u3058\u4f5c\u696d\u3092\u7e70\u308a\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>&#13;<br \/>\n&#13;<\/p>\n<p id=\"sec2_pv\">\u4eca\u56de\u307e\u3067\u306e\u4f5c\u696d\u3067Samba\u3092\u4f7f\u3063\u305fDC2\u53f0\u69cb\u6210\u306eAD\u4e92\u63db\u74b0\u5883\u3092\u4f5c\u6210\u3067\u304d\u307e\u3057\u305f\u3002\u6b21\u56de\u306fSamba AD\u306e\u57fa\u672c\u7684\u306a\u64cd\u4f5c\u306a\u3069\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Samba\u3092\u4f7f\u3063\u305fActive Directory\uff08\u4ee5\u4e0b\u3001AD\uff09\u4e92\u63db\u74b0\u5883\u306e\u69cb\u7bc9\u65b9\u6cd5\u3092\u8907\u6570\u56de\u306b\u5206\u3051\u3066\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002\u524d\u56de\u306fSamba\u3067\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\uff08\u4ee5\u4e0b\u3001DC\uff09\u30921\u53f0\u5c55\u958b\u3057\u3001AD\u4e92\u63db\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u5197\u9577<\/p>\n","protected":false},"author":2,"featured_media":2274234,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[762827],"tags":[765987,763397,109508,272439,762834,762833,521918,259538,27714,765985,162246,779849,198002,763396,2662,762832],"class_list":{"0":"post-2448644","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-science-technology","8":"tag-active-directory","9":"tag-gihyo-jp","10":"tag-os","11":"tag-samba","12":"tag-science-technology","13":"tag-science-news","14":"tag-technology-news","15":"tag-ubuntu","16":"tag-27714","17":"tag-765985","18":"tag-162246","19":"tag-779849","20":"tag-198002","21":"tag-763396","22":"tag-2662","23":"tag-762832"},"share_on_mastodon":{"url":"https:\/\/wakoka.com\/@news\/114115148918774645","error":""},"_links":{"self":[{"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/posts\/2448644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/comments?post=2448644"}],"version-history":[{"count":0,"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/posts\/2448644\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/media\/2274234"}],"wp:attachment":[{"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/media?parent=2448644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/categories?post=2448644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wacoca.com\/news\/wp-json\/wp\/v2\/tags?post=2448644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}