{"id":16199,"date":"2020-03-17T09:41:18","date_gmt":"2020-03-17T00:41:18","guid":{"rendered":"https:\/\/www.ekbt.work\/?p=16199"},"modified":"2024-05-19T07:37:59","modified_gmt":"2024-05-18T22:37:59","slug":"samba%e3%81%a7nas-7","status":"publish","type":"post","link":"https:\/\/ekbt.info\/?p=16199","title":{"rendered":"samba\u3067NAS-7"},"content":{"rendered":"<p>\u305d\u306e\uff17\u56de\u76ee\u3002samba\u3092\u52d5\u304b\u3059<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u3044\u3088\u3044\u3088samba\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a\u3002<\/p>\n<p>NAS\u306e\u672c\u4f53\u304bTeraTerm\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001samba\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3046\u3002NAS\u672c\u4f53\u306e\u30ed\u30b0\u30a4\u30f3\u306e\u5834\u5408\u3001root\u3067\u30ed\u30b0\u30a4\u30f3\u3001\u7aef\u672b\u3092\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p>TeraTerm\u306e\u5834\u5408\u306f\u30011\u500b\u4f5c\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3002\u305d\u3057\u3066su\u30b3\u30de\u30f3\u30c9\u3067root\u6a29\u9650\u3092\u53d6\u5f97\u3057\u3066\u304a\u304f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16179 size-full\" src=\"https:\/\/www.ekbt.info\/wp-content\/uploads\/2020\/03\/conect-ssh02.jpg\" alt=\"\" width=\"819\" height=\"582\" \/><\/p>\n<p>\u307e\u305a\u306fyum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<p>[root@localhost xxx]# yum -y install samba<\/p>\n<p>samba\u7528\u30e6\u30fc\u30b6\u30fc\uff08centos\uff09\u306e\u4f5c\u6210\u3002\u3053\u3053\u3067\u306f\u4eee\u306bcentos\u3068\u3044\u3046\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u540d\u306f\u81ea\u7531\u306b\u6c7a\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>[root@localhost ~]# useradd centos<\/p>\n<p>samba\u7528\u30e6\u30fc\u30b6\u30fc\uff08centos\uff09\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a<\/p>\n<p>[root@localhost ~]# passwd centos<\/p>\n<p>samba\u7528\u30e6\u30fc\u30b6\u30fc centos \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3002<br \/>\n\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9:<br \/>\n\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044:<br \/>\npasswd: \u3059\u3079\u3066\u306e\u8a8d\u8a3c\u30c8\u30fc\u30af\u30f3\u304c\u6b63\u3057\u304f\u66f4\u65b0\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>samba\u7528\u30e6\u30fc\u30b6\u30fc\uff08centos\uff09\u306e\u8a2d\u5b9a<\/p>\n<p>[root@localhost ~]# pdbedit -a centos<br \/>\nnew password:<br \/>\nretype new password:<br \/>\nUnix username: centos<br \/>\nNT username:<br \/>\nAccount Flags: [U ]<br \/>\nUser SID: S-1-5-21-1204239262-578675828-4075209457-1000<br \/>\nPrimary Group SID: S-1-5-21-1204239262-578675828-4075209457-513<br \/>\nFull Name:<br \/>\nHome Directory: \\\\localhost\\centos<br \/>\nHomeDir Drive:<br \/>\n\u30fb\u30fb\u30fb\u3000\u4e2d\u7565\u3000\u30fb\u30fb\u30fb<\/p>\n<p>samba\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210\u3001\u30aa\u30fc\u30ca\u30fc\u30c1\u30a7\u30f3\u30b8<br \/>\n[root@localhost xxx]# mkdir \/home\/samba<br \/>\n[root@localhost xxx]# chown nobody:nobody \/home\/samba<br \/>\n[root@localhost xxx]# chmod 777 \/home\/samba<\/p>\n<p>samba\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u3044\u3058\u308b\u3002vi\u3092\u4f7f\u3046\u5834\u5408\u3002<br \/>\n[root@localhost xxx]# vi \/etc\/samba\/smb.conf<\/p>\n<p>\u4ee5\u4e0b\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306e\u5909\u66f4\u70b9<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>#\u30d7\u30ea\u30f3\u30bf\u306f\u4f7f\u308f\u306a\u3044\u306e\u3067\u3001\uff03\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3082\u3057\u304f\u306fno\u8a2d\u5b9a<br \/>\n#printing = cups<br \/>\n#printcap name = cups<br \/>\nload printers = no<br \/>\ndisable spooles<br \/>\n#cups options = raw<\/p>\n<p>#\u3000Public\u516c\u958b\u306e\u8a2d\u5b9a\u3053\u306e\u90e8\u5206\u304cWindowsPC\u304b\u3089\u898b\u3048\u308b\u3088\u3046\u306b\u306a\u308b<\/p>\n<p>[public]<br \/>\ncomment = Public Stuff<br \/>\npath = \/home\/samba<br \/>\npublic = yes<br \/>\nwritable = yes<br \/>\nonly guest = yes<\/p>\n<p>\u4ee5\u4e0a\u3001\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u3001samba\u306e\u8d77\u52d5\u3002smb\u3068nmb\u306e\u4e8c\u3064\u304c\u3042\u308b\u306e\u3067\u3001\u4e21\u65b9\u5fc5\u305a\u8d77\u52d5\u3059\u308b\u3002<br \/>\n[root@localhost xxx]# systemctl start smb<br \/>\n[root@localhost xxx]# systemctl start nmb<\/p>\n<p>\u305d\u3057\u3066\u3001samba\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<br \/>\n[root@localhost xxx]# systemctl enable smb<br \/>\n[root@localhost xxx]# systemctl enable nmb<\/p>\n<p>\u3053\u308c\u3067\u3001WindowsPC\u304b\u3089\u898b\u3048\u308b\u3088\u3046\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304b\u3089\u898b\u3066\u307f\u307e\u3059\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u6240\u306bNAS\u306b\u8a2d\u5b9a\u3057\u305fIP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u307e\u3059\u3002\uff08\u4f8b\u3002\uffe5\uffe5192.168.xxx.xxx\u3000xxx.xxx\u306f\u8a2d\u5b9a\u3057\u305fIP\u30a2\u30c9\u30ec\u30b9\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\u3059\u308b\u3068\u3001\u300c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8cc7\u683c\u60c5\u5831\u306e\u5165\u529b\u300d\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u4f5c\u6210\u3057\u305fsamba\u7528\u30e6\u30fc\u30b6\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u3001\u300c\u8cc7\u683c\u60c5\u5831\u3092\u8a18\u61b6\u3059\u308b\u300d\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u3059\u308b\u3068\u6b21\u56de\u304b\u3089\u300c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8cc7\u683c\u60c5\u5831\u306e\u5165\u529b\u300d\u3092\u305b\u305a\u306b\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16203 size-full\" src=\"https:\/\/www.ekbt.info\/wp-content\/uploads\/2020\/03\/fstloginsamba02.jpg\" alt=\"\" width=\"992\" height=\"668\" \/><\/p>\n<p>NAS\u5185\u304c\u898b\u3048\u305f\u3089\u3001public\u30d5\u30a9\u30eb\u30c0\u30fc\u5185\u304c\u81ea\u7531\u306b\u8aad\u307f\u66f8\u304d\u51fa\u6765\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u4f5c\u3063\u305f\u308a\u30c7\u30fc\u30bf\u3092\u66f8\u3044\u305f\u308a\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16204 size-full\" src=\"https:\/\/www.ekbt.info\/wp-content\/uploads\/2020\/03\/fstloginsamba03.jpg\" alt=\"\" width=\"992\" height=\"668\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16205 size-full\" src=\"https:\/\/www.ekbt.info\/wp-content\/uploads\/2020\/03\/fstloginsamba04.jpg\" alt=\"\" width=\"1038\" height=\"668\" \/><\/p>\n<p>\u4e2d\u304c\u898b\u3048\u306a\u3044\u3068\u306a\u308b\u3068\u3001samba\u306e\u8a2d\u5b9a\u3084\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u8a2d\u5b9a\u3001SElinux\u306e\u8a2d\u5b9a\u7b49\u3092\u3082\u3046\u4e00\u5ea6\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u52d5\u4f5c\u304c\u5b89\u5b9a\u3057\u3066\u304f\u308b\u3068\u3001NAS\u306b\u4ed8\u3051\u305f\u540d\u524d\u3067\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001HDD\u3092\u30de\u30a6\u30f3\u30c8\u3057\u3066public\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u8ffd\u52a0\u8a2d\u5b9a\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306b\u898b\u3048\u3066\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16208 size-full\" src=\"https:\/\/www.ekbt.info\/wp-content\/uploads\/2020\/03\/fstloginsamba05.jpg\" alt=\"\" width=\"992\" height=\"668\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u305d\u306e\uff17\u56de\u76ee\u3002samba\u3092\u52d5\u304b\u3059 \u305d\u308c\u3067\u306f\u3001\u3044\u3088\u3044\u3088samba\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a\u3002 NAS\u306e\u672c\u4f53\u304bTeraTerm\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001samba\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3046\u3002NAS\u672c\u4f53\u306e\u30ed\u30b0\u30a4\u30f3\u306e\u5834\u5408\u3001root\u3067\u30ed\u30b0\u30a4\u30f3\u3001\u7aef\u672b\u3092\u8d77 &hellip; <a href=\"https:\/\/ekbt.info\/?p=16199\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;samba\u3067NAS-7&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":14194,"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,488,98,151,412],"class_list":["post-16199","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-win-pc-web","tag-centos","tag-centos7","tag-linux","tag-nas","tag-samba"],"_links":{"self":[{"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/posts\/16199","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=16199"}],"version-history":[{"count":2,"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/posts\/16199\/revisions"}],"predecessor-version":[{"id":18820,"href":"https:\/\/ekbt.info\/index.php?rest_route=\/wp\/v2\/posts\/16199\/revisions\/18820"}],"wp:attachment":[{"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekbt.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}