{"id":2820,"date":"2024-07-26T20:44:04","date_gmt":"2024-07-26T11:44:04","guid":{"rendered":"https:\/\/weblog.hirohiro716.com\/?p=2820"},"modified":"2024-08-03T12:12:22","modified_gmt":"2024-08-03T03:12:22","slug":"almalinux9%e3%82%92%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e5%8f%82%e5%8a%a0%e3%81%95%e3%81%9b%e3%81%a6%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/weblog.hirohiro716.com\/?p=2820","title":{"rendered":"AlmaLinux9\u3092\u30c9\u30e1\u30a4\u30f3\u53c2\u52a0\u3055\u305b\u3066\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u3059\u308b"},"content":{"rendered":"<h3>\u74b0\u5883<\/h3>\n<p><a href=\"\/?p=2725\">\u3053\u3053<\/a>\u306e\u624b\u9806\u3067\u69cb\u7bc9\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u8a8d\u8a3c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n\u30fb AlmaLinux\u306e\u30d0\u30fc\u30b8\u30e7\u30f3: 9.4\r\n\u30fb \u30db\u30b9\u30c8\u540d: samba.ad.example.jp\r\n\u30fb IP\u30a2\u30c9\u30ec\u30b9: 192.168.1.13\r\n\u30fb realmd\u306e\u30d0\u30fc\u30b8\u30e7\u30f3: 0.17.1\r\n\u30fb samba\u306e\u30d0\u30fc\u30b8\u30e7\u30f3: 4.19.4\r\n<\/pre>\n<p style=\"margin-top:2em;\">\nFQDN\u3067\u30db\u30b9\u30c8\u540d\u3092\u8a2d\u5b9a\u3059\u308b\u3002\n<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# hostnamectl set-hostname samba.ad.example.jp\r\n<\/pre>\n<p style=\"margin-top:1em;\">\n\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\n<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# dnf install realmd samba\r\n<\/pre>\n<p>\n\u53c2\u7167\u3059\u308bDNS\u3092\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u5909\u66f4\u3059\u308b\u3002\n<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# nmcli connection modify &#x5B;\u30b3\u30cd\u30af\u30b7\u30e7\u30f3ID] ipv4.dns &#x5B;\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306eIP\u30a2\u30c9\u30ec\u30b9]\r\n# nmcli connection up &#x5B;\u30b3\u30cd\u30af\u30b7\u30e7\u30f3ID]\r\n<\/pre>\n<p>\nsmb.conf\u3092\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u3002\n<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# mv \/etc\/samba\/smb.conf \/etc\/samba\/smb.conf.backup\r\n<\/pre>\n<p>\n\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306bjoin\u3059\u308b\u3002<br \/>\n\u203b\u30c9\u30e1\u30a4\u30f3\u306e\u30e1\u30f3\u30d0\u30fc\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306bsamba\u3092\u6307\u5b9a<br \/>\n\u203b\u30c9\u30e1\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e\u8a8d\u8a3c\u3092\u51e6\u7406\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306bwinbind\u3092\u6307\u5b9a\n<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# realm join --membership-software=samba --client-software=winbind AD.EXAMPLE.JP\r\n<\/pre>\n<p>\u5171\u6709\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002<br \/>\n\u203broot\u4ee5\u5916\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# mkdir -p \/data\/samba\/share\r\n# chmod 770 \/data\/samba\/share\r\n<\/pre>\n<p>\u521d\u671f\u8a2d\u5b9a\u3055\u308c\u305fsamba\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u6700\u4e0b\u884c\u306b\u8ffd\u8a18\u3059\u308b\u3002<br \/>\n\u203b\u300cforce user\u300d\u306broot\u3092\u6307\u5b9a\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c\u3092root\u3067\u5b9f\u884c\u3055\u305b\u308b<\/p>\n<pre class=\"brush: plain; title: \/etc\/samba\/smb.conf; notranslate\" title=\"\/etc\/samba\/smb.conf\">\r\n&#x5B;share]\r\npath = \/data\/samba\/share\r\ncreate mask = 0660\r\ndirectory mask = 0770\r\nforce user = root\r\nwritable = yes\r\nvalid users = @&quot;example\\domain users&quot; &quot;example\\administrator&quot;\r\n<\/pre>\n<p>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306b\u4f8b\u5916\u3092\u767b\u9332\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# firewall-cmd --permanent --add-service=samba\r\n# firewall-cmd --reload\r\n<\/pre>\n<p>SELinux\u306e\u30e9\u30d9\u30eb\u4ed8\u3051\u3092\u884c\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# semanage fcontext -a -t samba_share_t &quot;\/data\/samba\/share(\/.*)?&quot;\r\n# restorecon -RF \/data\/samba\/share\/\r\n<\/pre>\n<p>SELinux\u306bsmbd\u306b\u3088\u308b\u30d1\u30d6\u30ea\u30c3\u30af\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u306e\u66f8\u304d\u8fbc\u307f\u3092\u6709\u52b9\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# setsebool -P allow_smbd_anon_write true\r\n<\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u3092\u6709\u52b9\u306b\u3057\u3066\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# systemctl enable --now smb\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u74b0\u5883 \u3053\u3053\u306e\u624b\u9806\u3067\u69cb\u7bc9\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u8a8d\u8a3c\u3059\u308b\u3002 \u30fb AlmaLinux\u306e\u30d0\u30fc\u30b8\u30e7\u30f3: 9.4 \u30fb \u30db\u30b9\u30c8\u540d: samba.ad.example.jp \u30fb IP\u30a2\u30c9\u30ec\u30b9: 192.168.1.13 \u30fb rea [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-2820","post","type-post","status-publish","format-standard","hentry","category-almalinux"],"views":1831,"_links":{"self":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/2820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2820"}],"version-history":[{"count":3,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/2820\/revisions"}],"predecessor-version":[{"id":2826,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/2820\/revisions\/2826"}],"wp:attachment":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}