{"id":428,"date":"2020-04-13T12:21:05","date_gmt":"2020-04-13T03:21:05","guid":{"rendered":"https:\/\/blog.hgrs.me\/?p=428"},"modified":"2020-04-12T12:26:48","modified_gmt":"2020-04-12T03:26:48","slug":"raspberry-pi-%e3%81%a7-samba-%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%97%e3%81%a6%e3%83%9b%e3%83%bc%e3%83%a0%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e3%81%ab%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9","status":"publish","type":"post","link":"https:\/\/blog.hgrs.me\/archives\/428.html","title":{"rendered":"Raspberry Pi \u3067 Samba \u3092\u8a2d\u5b9a\u3057\u3066\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b"},"content":{"rendered":"

\u306f\u3058\u3081\u306b<\/h2>\n

\u30e9\u30ba\u30d1\u30a4\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u306e\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

Samba \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n

Samba<\/a> \u306f SMB \u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u5229\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n

Raspbian \u3067\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

$ sudo apt install samba<\/code><\/pre>\n

\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8a2d\u5b9a<\/h2>\n

\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f Samba \u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f \/etc\/samba\/smb.conf<\/code> \u306b\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u7de8\u96c6\u3057\u3066\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n

\u304a\u597d\u304d\u306a\u30a8\u30c7\u30a3\u30bf\u304b sudo nano \/etc\/samba\/smb.conf<\/code> \u306e\u30b3\u30de\u30f3\u30c9\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n

#<\/code> \u306e\u884c\u306f\u30b3\u30e1\u30f3\u30c8\u306a\u306e\u3067\u5165\u529b\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093<\/p>\n

# [homes] \u3088\u308a\u4e0b\u3092\u7de8\u96c6\n# browsable = no \u3092 yes \u306b\u5909\u66f4\nbrowsable = yes\n# read only = yes \u3092 no \u306b\u5909\u66f4\nread only = no\n# create mask = 0700 \u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8 \/ \u3082\u3057\u304f\u306f\u6a29\u9650\u5909\u66f4\n# directory mask = 0700 \u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8 \/ \u3082\u3057\u304f\u306f\u6a29\u9650\u5909\u66f4<\/code><\/pre>\n

\u3053\u308c\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308c\u3070\u3001\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n

Samba \u30e6\u30fc\u30b6\u306e\u4f5c\u6210<\/h2>\n

Samba \u306e\u30e6\u30fc\u30b6\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30e6\u30fc\u30b6\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n

$ sudo smbpasswd -a <user_name><\/code><\/pre>\n

<user_name><\/code> \u306f\u81ea\u5206\u306e\u597d\u304d\u306a\u3082\u306e\u306b\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070 pi<\/code> \u306e\u5834\u5408\u306f sudo smbpasswd -a pi<\/code> \u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n

Samba \u306e\u518d\u8d77\u52d5<\/h2>\n

\u5909\u66f4\u3057\u305f\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u307e\u305b\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001Samba \u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n

$ sudo systemctl restart smbd<\/code><\/pre>\n

\u3053\u308c\u3067\u4ed6\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u81ea\u7531\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n

\u4ed6\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3002<\/h2>\n

\u4f8b\u3048\u3070 macOS \u304b\u3089\u306f Finder \u3067 Command + K \u3067\u30b5\u30fc\u30d0\u3078\u63a5\u7d9a\u3057\u3001 smb:\/raspberrypi.local\/<\/code> \u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u3067\u63a5\u7d9a\u3059\u308b\u3068\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u9078\u629e\u3067\u304d\u3066 Home<\/code> \u3092\u9078\u3076\u3068\u3001\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3067\u304d\u307e\u3059\u3002<\/p>\n

\u3053\u306e\u969b raspberrypi.local<\/code> \u306e\u90e8\u5206\u306f\u74b0\u5883\u306b\u3088\u3063\u3066 IP \u30a2\u30c9\u30ec\u30b9\u3084\u30db\u30b9\u30c8\u540d\u306b\u9069\u5b9c\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n

\u304a\u308f\u308a\u306b<\/h2>\n

\u3053\u308c\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u79fb\u52d5\u3084\u5171\u6709\u304c\u7c21\u5358\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u306f\u3058\u3081\u306b \u30e9\u30ba\u30d1\u30a4\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u306e\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 Samba …<\/p>\n","protected":false},"author":1,"featured_media":429,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[40],"_links":{"self":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/428"}],"collection":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":0,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media\/429"}],"wp:attachment":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}