{"id":6548,"date":"2017-06-16T15:26:10","date_gmt":"2017-06-16T06:26:10","guid":{"rendered":"http:\/\/www.ekbt.net\/blog\/?p=6548"},"modified":"2017-06-16T15:26:10","modified_gmt":"2017-06-16T06:26:10","slug":"ax57a%e3%81%ae%e3%83%ab%e3%83%bc%e3%82%bf%e3%81%a7samba","status":"publish","type":"post","link":"https:\/\/ekbt.info\/?p=6548","title":{"rendered":"AX\/57A\u306e\u30eb\u30fc\u30bf\u3067samba"},"content":{"rendered":"<h1 class=\"entry-title\">\u25a0samba\u306e\u7a3c\u50cd<\/h1>\n<p>AX\/57A\u306e\u30eb\u30fc\u30bf\u5316\u3082\u4e00\u6bb5\u843d\u3001\u4e00\u5fdc\u9806\u8abf\u306b\u7a3c\u50cd\u3057\u3066\u3044\u308b\u3002AX\/57A\u306eHDD\u306f320GB\u306e\u5bb9\u91cf\u306a\u306e\u3067\u3001200GB\u7a0b\u5ea6\u4f59\u3063\u3066\u3044\u308b\u3002\u3053\u306e\u307e\u307e\u7a3c\u50cd\u3055\u305b\u3066\u3082\u3001\u7279\u306b\u305d\u306e\u307e\u307e\u306e\u5bb9\u91cf\u304c\u4f59\u3063\u305f\u307e\u307e\u306a\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u3082\u3063\u305f\u3044\u306a\u3044\u306e\u3067\u3001samba\u3092\u7a3c\u50cd\u3055\u305b\u305f\u3002NAS\u3068\u4e21\u65b9\u306e\u4fdd\u5b58\u3067\u91cd\u8981\u30d5\u30a1\u30a4\u30eb\u306e\u5b8c\u74a7\u4fdd\u8b77\u3002\u3042\u307e\u308a\u3067\u304b\u3044\u30d5\u30a1\u30a4\u30eb\u306f\u7f6e\u3051\u306a\u3044\u304c\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u5c0f\u7269\u306e\u7f6e\u304d\u5834\u306b\u306f\u4fbf\u5229\u304b\u3068\u3002100GB\u7a0b\u5ea6\u306f\u3064\u304b\u3063\u3066\u3082\u554f\u984c\u306a\u3044\u3060\u308d\u3046\u3002\u6700\u8fd1\u306f\u30af\u30e9\u30a6\u30c9\u3082\u8ab2\u91d1\u304c\u666e\u901a\u306b\u306a\u3063\u3066\u304d\u305f\u306e\u3067\u3001100GB\u3068\u8a00\u3048\u3069\u3082\u3001\u30af\u30e9\u30a6\u30c9\u3092\u501f\u308a\u308b\u3068100\uff5e200\u5186\uff0f\u6708\u4f4d\u306f\u304b\u304b\u308b\u306e\u3067\u99ac\u9e7f\u306b\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p># yum install samba<\/p>\n<p>\u305d\u3057\u3066\u3001\u3064\u304e\u306bsamba\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002\u30c1\u30a7\u30f3\u30b8\u30aa\u30fc\u30ca\u30fc\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30aa\u30fc\u30ca\u30fc\u3092\u30ce\u30fc\u30dc\u30c7\u30a3\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n<p># mkdir \uff0fhome\uff0fsamba<br \/>\n# chown nobody:nobody \uff0fhome\uff0fsamba<\/p>\n<p>\u6b21\u306f\u3001samba\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3001smb.conf\u3092\u3044\u3058\u308b\u3002<\/p>\n<p># vi \uff0fetc\uff0fsamba\uff0fsmb.conf<br \/>\n[global]<\/p>\n<p>#\u3000Linux\u5074\u65e5\u672c\u8a9e\u6587\u5b57\u30b3\u30fc\u30c9\u3068Windows\u5074\u65e5\u672c\u8a9e\u6587\u5b57\u30b3\u30fc\u30c9\u306e\u8a2d\u5b9a<br \/>\nunix charset = UTF-8<br \/>\ndos charset = CP932<\/p>\n<p>#\u3000Windows\u306e\u30ef\u30fc\u30af\u30b0\u30eb\u30fc\u30d7\u306e\u8a2d\u5b9a\u3068\u3001Windows\u5074\u304b\u3089\u306e\u8868\u793a\u540d\u306e\u8a2d\u5b9a<br \/>\nworkgroup = xxxx<br \/>\nserver string = Samba Server Version %v<\/p>\n<p>netbios name = LinuxSamba<\/p>\n<p>#\u3000LAN\u5185\u90e8\u304b\u3089\u306e\u307f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b<br \/>\nhosts allow = 192.168.1. 127.<\/p>\n<p>#\u3000Public\u516c\u958b\u306e\u8a2d\u5b9a<\/p>\n<p>[public]<br \/>\ncomment = Public Stuff<br \/>\npath = \uff0fhome\uff0fsamba<br \/>\npublic = yes<br \/>\nwritable = yes<br \/>\nonly guest = yes<\/p>\n<p>\u7d42\u308f\u3063\u305f\u3089\u3001\u8d77\u52d5\u30c6\u30b9\u30c8\u3002\u554f\u984c\u306a\u3044\u3088\u3046\u3060\u3063\u305f\u3089\u3001\u8d77\u52d5\u6642\u306b\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u3088\u3046chkconfig\u3067\u8a2d\u5b9a\u3002smb\u3068nmb\u306e2\u3064\u3042\u308b\u306e\u3067\u3001\u6ce8\u610f\uff01\uff01<\/p>\n<p># \uff0fetc\uff0frc.d\uff0finit.d\uff0fsmb start<br \/>\nSMB \u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u4e2d: \u3000\u3000\u3000\u3000[ OK ]<br \/>\n# \uff0fetc\uff0frc.d\uff0finit.d\uff0fnmb start<br \/>\nNMB \u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u4e2d:\u3000\u3000\u3000\u3000 [ OK ]<br \/>\n# chkconfig smb on<br \/>\n# chkconfig nmb on<br \/>\n# chkconfig &#8211;list smb<br \/>\nsmb 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br \/>\n# chkconfig &#8211;list nmb<br \/>\nnmb 0:off 1:off 2:on 3:on 4:on 5:on 6:off<\/p>\n<p>SELinux\u304c\u52d5\u3044\u3066\u3044\u308b\u3068\u3001samba\u306e\u5171\u6709\u9818\u57df\u3078Windows\u5074\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u306e\u3067\u3001SELinux\u306f\u5207\u3063\u3066\u304a\u304f\u304b\u3001SELinux\u3067\u5171\u6709\u9818\u57df\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>SELinux\u3092\u6b62\u3081\u308b\u306b\u306f\u3001<\/p>\n<p>selinux\u306e\u72b6\u614b\u3092\u898b\u308b<br \/>\n# getenforce<br \/>\nEnforcing<\/p>\n<p>\u7a3c\u50cd\u4e2d\u306a\u306e\u3067\u3001<br \/>\nselinux\u306e\u7a3c\u50cd\u505c\u6b62<br \/>\n# setenforce 0<\/p>\n<p>selinux\u306e\u72b6\u614b\u3092\u898b\u308b<br \/>\n# getenforce<br \/>\nPermissive<\/p>\n<p>\u8b66\u544a\u306e\u307f\u8868\u793a\u306e\u30e2\u30fc\u30c9\u306b\u306a\u3063\u305f\u3002<\/p>\n<p>selinux\u306e\u8a2d\u5b9a\u3092\u3044\u3058\u3063\u3066\u3001\u4eca\u5f8c\u52d5\u304b\u306a\u3044\u3088\u3046\u306b\u3059\u308b<br \/>\n# vi \uff0fetc\uff0fsysconfig\uff0fselinux<\/p>\n<p># This file controls the state of SELinux on the system.<br \/>\n# SELINUX= can take one of these three values:<br \/>\n# enforcing ? SELinux security policy is enforced.<br \/>\n# permissive ? SELinux prints warnings instead of enforcing.<br \/>\n# disabled ? No SELinux policy is loaded.<br \/>\n#SELINUX=enforcing<br \/>\n#selinux\u7a3c\u50cd\u505c\u6b62<br \/>\nSELINUX=disabled<br \/>\n# SELINUXTYPE= can take one of three two values:<br \/>\n# targeted ? Targeted processes are protected,<br \/>\n# minimum ? Modification of targeted policy. Only selected processes are protected.<br \/>\n# mls ? Multi Level Security protection.<br \/>\nSELINUXTYPE=targeted<\/p>\n<p>\u305d\u308c\u304b\u3001SELinux\u306e\u7ba1\u7406\u3067samba\u8a2d\u5b9a\u3092\u3044\u3058\u308b\u3002<\/p>\n<p>GUI\u30c4\u30fc\u30eb\u304c\u5165\u3063\u3066\u3044\u306a\u5834\u5408\u306f\u3001<br \/>\n\u30b3\u30de\u30f3\u30c9\u3067\u3082\u3067\u304d\u308b\u3001yum\u3067\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u304c\u9055\u3046\u306e\u3067\u3061\u3087\u3063\u3068\u6ce8\u610f\u304c\u5fc5\u8981\u3002<\/p>\n<p># yum install policycoreutils-gui<\/p>\n<p>GUI\u3092\u4f7f\u3044\u305f\u304f\u306a\u3044\u5834\u5408\u3001\u307e\u305f\u306f\u305d\u3082\u305d\u3082GUI(GNOME)\u304c\u52d5\u3044\u3066\u3044\u306a\u3044\u5834\u5408\u3001bool\u306e\u5909\u66f4\u306a\u3069\u306f\u30b3\u30de\u30f3\u30c9\u3067\u3082\u3067\u304d\u308b\u3002\u30b5\u30f3\u30d0\u306b\u30e6\u30fc\u30b6\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001<\/p>\n<p># setsebool -P samba_enable_home_dirs 1<\/p>\n<p>\u3068\u3044\u3046\u5177\u5408\u306b\u3059\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0samba\u306e\u7a3c\u50cd AX\/57A\u306e\u30eb\u30fc\u30bf\u5316\u3082\u4e00\u6bb5\u843d\u3001\u4e00\u5fdc\u9806\u8abf\u306b\u7a3c\u50cd\u3057\u3066\u3044\u308b\u3002AX\/57A\u306eHDD\u306f320GB\u306e\u5bb9\u91cf\u306a\u306e\u3067\u3001200GB\u7a0b\u5ea6\u4f59\u3063\u3066\u3044\u308b\u3002\u3053\u306e\u307e\u307e\u7a3c\u50cd\u3055\u305b\u3066\u3082\u3001\u7279\u306b\u305d\u306e\u307e\u307e\u306e\u5bb9\u91cf\u304c\u4f59\u3063\u305f\u307e\u307e\u306a\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u3082\u3063 &hellip; <a href=\"https:\/\/ekbt.info\/?p=6548\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;AX\/57A\u306e\u30eb\u30fc\u30bf\u3067samba&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":14434,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[139,10],"tags":[487,801,98,412,511],"class_list":["post-6548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-win-pc-web","tag-centos","tag-centos-6-9","tag-linux","tag-samba","tag-selinux"],"_links":{"self":[{"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/posts\/6548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6548"}],"version-history":[{"count":0,"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/posts\/6548\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}