{"id":1727,"date":"2023-01-13T16:46:59","date_gmt":"2023-01-13T07:46:59","guid":{"rendered":"https:\/\/ysfarm.jp\/blog\/?p=1727"},"modified":"2023-01-12T11:52:22","modified_gmt":"2023-01-12T02:52:22","slug":"centos-stream9-%e5%88%9d%e6%9c%9f%e8%a8%ad%e5%ae%9a-%e3%81%9d%e3%81%ae8-smb%ef%bc%9awindows%e3%81%a8%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e5%85%b1%e6%9c%89%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/ysfarm.jp\/blog\/2023\/01\/13\/centos-stream9-%e5%88%9d%e6%9c%9f%e8%a8%ad%e5%ae%9a-%e3%81%9d%e3%81%ae8-smb%ef%bc%9awindows%e3%81%a8%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e5%85%b1%e6%9c%89%e3%81%99%e3%82%8b\/","title":{"rendered":"CentOS Stream9 \u521d\u671f\u8a2d\u5b9a \u305d\u306e8 SMB\uff1aWindows\u3068\u30d5\u30a1\u30a4\u30eb\u306e\u5171\u6709\u3059\u308b"},"content":{"rendered":"<p>Samba\u306b\u3088\u308b\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u3067\u3059\u3002<br \/>\nNAS\u306e\u3088\u3046\u306b\u4f7f\u3048\u307e\u3059\u3001\u3076\u3063\u3061\u3083\u3051NAS\u3092\u8a2d\u7f6e\u3059\u308b\u306e\u304c\u4e00\u756a\u7c21\u5358\u3067\u3059\u304c\u3001\u8208\u5473\u672c\u4f4d\u3067\u3084\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre>sudo dnf -y install samba samba-client cifs-utils\r\n\r\n=========================================================================================================================================\r\n \u30d1\u30c3\u30b1\u30fc\u30b8                               \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc         \u30d0\u30fc\u30b8\u30e7\u30f3                             \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc             \u30b5\u30a4\u30ba\r\n=========================================================================================================================================\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\r\n samba                                    x86_64                   4.17.2-103.el9                         cifs-utils                        x86_64                      6.14-1.el9                           baseos                          98 k\r\n samba-client                      x86_64                      4.17.2-103.el9                       appstream                      673 k\r\n....\r\n....\r\n....\r\n\r\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!\r\n\r\n<\/pre>\n<p># \u25a0\u25a0\u25a0\u25a0\u3000\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u30fc\u8a2d\u5b9a\u3000\u25a0\u25a0\u25a0\u25a0<\/p>\n<p>\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308a\u307e\u3059<\/p>\n<pre>sudo mkdir \/home\/share\r\nsudo chmod 777 \/home\/share\r\nsudo vi \/etc\/samba\/smb.conf\r\n\r\n[global]\r\n        # 11\u884c\u76ee : \u6587\u5b57\u30b3\u30fc\u30c9\u306e\u8a2d\u5b9a\u3092\u8ffd\u8a18\r\n        unix charset = UTF-8\r\n        dos charset = CP932\r\n        workgroup = SAMBA\r\n        security = user\r\n        # \u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u8ffd\u8a18\r\n        hosts allow = 127. 10.0.0. \uff08\u3054\u81ea\u5206\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\uff09\r\n        # \u8ffd\u8a18 (\u8a8d\u8a3c\u4e0d\u8981\u3068\u3059\u308b)\r\n        map to guest = Bad User\r\n\r\n....\r\n....\r\n....\r\n\r\n# \u25a0\u25a0\u25a0\u25a0\u3000\u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u30d5\u30a9\u30eb\u30c0\u30fc\u8a2d\u5b9a\u3000\u25a0\u25a0\u25a0\u25a0\r\n\r\n\r\n[homes]\r\n#\u8ffd\u52a0(\/home\/\u30e6\u30fc\u30b6\u30fc\u540d\/samba\u3092\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3059\u308b)\r\n        path = %H\/\r\n#\u3054\u307f\u7bb1\u306e\u6709\u52b9\u5316\r\n        vfs objects = recycle\r\n#\u3054\u307f\u7bb1\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d(\/home\/\u30e6\u30fc\u30b6\u540d\/.recycle)\r\n        recycle:repository = .recycle\r\n#\u3054\u307f\u7bb1\u3078\u79fb\u52d5\u6642\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u3092\u7dad\u6301\u3057\u306a\u3044\r\n        recycle:keeptree = no\r\n#\u540c\u540d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u3054\u307f\u7bb1\u306b\u3042\u308b\u5834\u5408\u306b\u5225\u540d\u3067\u79fb\u52d5\r\n        recycle:versions = yes\r\n#\u3054\u307f\u7bb1\u3078\u79fb\u52d5\u6642\u306b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u66f4\u65b0\u3057\u306a\u3044\r\n        recycle:touch = no\r\n#\u3054\u307f\u7bb1\u3078\u79fb\u52d5\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u4e0a\u9650(0:\u7121\u5236\u9650)\r\n        recycle:maxsize = 0\r\n#\u3053\u3053\u3067\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3054\u307f\u7bb1\u3078\u79fb\u52d5\u305b\u305a\u306b\u5373\u524a\u9664\u3059\u308b\r\n        recycle:exclude = *.tmp ~$*\r\n\r\n....\r\n....\r\n....\r\n\r\n# \u6700\u7d42\u884c\u306b\u8ffd\u8a18\r\n# \u4efb\u610f\u306e\u5171\u6709\u540d\u3092\u8a2d\u5b9a\r\n# \u25a0\u25a0\u25a0\u25a0\u3000\u30d5\u30eb\u30a2\u30af\u30bb\u30b9\u306e\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u30fc\u8a2d\u5b9a\u3000\u25a0\u25a0\u25a0\u25a0\r\n\r\n[Share]\r\n        # \u5171\u6709\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u6307\u5b9a\r\n        path = \/home\/share\r\n        # \u66f8\u304d\u8fbc\u307f\u3092\u8a31\u53ef\u3059\u308b\r\n        writable = yes\r\n        # \u30b2\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc (nobody) \u3092\u8a31\u53ef\u3059\u308b\r\n        guest ok = yes\r\n        # \u5168\u3066\u30b2\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u6271\u3046\r\n        guest only = yes\r\n        # \u30d5\u30a1\u30a4\u30eb\u4f5c\u6210\u6642\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092 [777] \u3068\u3059\u308b\r\n        force create mode = 777\r\n        # \u30d5\u30a9\u30eb\u30c0\u30fc\u4f5c\u6210\u6642\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092 [777] \u3068\u3059\u308b\r\n        force directory mode = 777 \r\n\r\n\r\n\u4fdd\u5b58\u3057\u3066\r\n\r\nsudo systemctl enable --now smb\r\n\r\nfirewall-cmd --add-service=samba\r\nsuccess\r\n\r\nfirewall-cmd --runtime-to-permanent\r\nsuccess\r\n<\/pre>\n<p>\u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u3092samba\u30e6\u30fc\u30b6\u30fc\u306b\u3059\u308b<\/p>\n<pre>\uff0d\uff0d\u65e2\u5b58\u306e\u30e6\u30fc\u30b6\u3092Samba\u30b5\u30fc\u30d0\u30fc\u30a2\u30af\u30bb\u30b9\u7528\u30e6\u30fc\u30b6\u3068\u3059\u308b\u5834\u5408\u306f\u3053\u3053\u304b\u3089\uff0d\uff0d\r\nsudo pdbedit -a centos\u3000\u2190\u3000Linux\u306b\u767b\u9332\u6e08\u306e\u30e6\u30fc\u30b6\u3092Samba\u30b5\u30fc\u30d0\u30fc\u30a2\u30af\u30bb\u30b9\u7528\u30e6\u30fc\u30b6\u3068\u3057\u3066\u65b0\u898f\u767b\u9332(\u4f8b\u3068\u3057\u3066centos\u3068\u3059\u308b)\r\nnew password:\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u5fdc\u7b54\r\nretype new password:\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u5fdc\u7b54(\u78ba\u8a8d)\r\nUnix username:        ysfarm\r\nNT username:\r\nAccount Flags:        [U          ]\r\nUser SID:             xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\nPrimary Group SID:    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\nFull Name:            centos\r\nHome Directory:       \\\\linux\\centos\r\nHomeDir Drive:\r\nLogon Script:\r\nProfile Path:         \\\\linux\\centos\\profile\r\nDomain:               linux\r\nAccount desc:\r\nWorkstations:\r\nMunged dial:\r\nLogon time:           0\r\nLogoff time:          \u6728, 07  2\u6708 2036 00:06:39 JST\r\nKickoff time:         \u6728, 07  2\u6708 2036 00:06:39 JST\r\nPassword last set:    \u571f, 07  1\u6708 2023 16:42:41 JST\r\nPassword can change:  \u571f, 07  1\u6708 2023 16:42:41 JST\r\nPassword must change: never\r\nLast bad password   : 0\r\nBad password count  : 0\r\nLogon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\r\n<\/pre>\n<p>\u203b\u53c2\u8003\u30b5\u30a4\u30c8<br \/>\n<a href=\"https:\/\/centossrv.com\/samba.shtml\">https:\/\/centossrv.com\/samba.shtml<\/a><br \/>\n<a href=\"https:\/\/www.server-world.info\/\">https:\/\/www.server-world.info\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Samba\u306b\u3088\u308b\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u3067\u3059\u3002 NAS\u306e\u3088\u3046\u306b\u4f7f\u3048\u307e\u3059\u3001\u3076\u3063\u3061\u3083\u3051NAS\u3092\u8a2d\u7f6e\u3059\u308b\u306e\u304c\u4e00\u756a\u7c21\u5358\u3067\u3059\u304c\u3001\u8208\u5473\u672c\u4f4d\u3067\u3084\u3063\u3066\u307f\u307e\u3059\u3002 sudo dnf -y install samba samba-client  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1508,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"vkexunit_cta_each_option":"","footnotes":""},"categories":[405,404,399],"tags":[],"class_list":["post-1727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-linux","category-399"],"_links":{"self":[{"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/posts\/1727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/comments?post=1727"}],"version-history":[{"count":8,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/posts\/1727\/revisions"}],"predecessor-version":[{"id":1740,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/posts\/1727\/revisions\/1740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/media\/1508"}],"wp:attachment":[{"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/media?parent=1727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/categories?post=1727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ysfarm.jp\/blog\/wp-json\/wp\/v2\/tags?post=1727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}