[root@ns2 ~]# yum -y install samba samba-client |
インストール: |
samba.x86_64 0:4.1.12-21.el7_1 samba-client.x86_64 0:4.1.12-21.el7_1 |
依存性関連をインストールしました: |
cups-libs.x86_64 1:1.6.3-17.el7 libldb.x86_64 0:1.1.17-2.el7 |
libsmbclient.x86_64 0:4.1.12-21.el7_1 libtalloc.x86_64 0:2.1.1-1.el7 |
libtdb.x86_64 0:1.3.0-1.el7 libtevent.x86_64 0:0.9.21-3.el7 |
libwbclient.x86_64 0:4.1.12-21.el7_1 pytalloc.x86_64 0:2.1.1-1.el7 |
samba-common.x86_64 0:4.1.12-21.el7_1 samba-libs.x86_64 0:4.1.12-21.el7_1 |
完了しました! |
全ユーザー用共有ディレクトリを作成します。 |
[root@ns2 ~]# mkdir /home/samba |
[root@ns2 ~]# chown nobody:nobody /home/samba/ |
[root@ns2 ~]# chmod 777 /home/samba/ |
所有者とアクセス権の確認 |
[root@ns2 home]# ls -l /home/ |
合計 4 |
drwx------. 5 hopu hopu 4096 4月 12 16:47 hopu |
drwx------. 3 mokyu mokyu 90 3月 31 04:23 mokyu |
drwxrwxrwx. 2 nobody nobody 46 4月 13 16:54 samba |
設定ファイルの編集をします。 |
[root@ns2 ~]# cp /etc/samba/smb.conf /etc/samba/smb.conforg |
[root@ns2 ~]# vi /etc/samba/smb.conf |
#======================= Global Settings ===================================== |
[global] |
unix charset = UTF-8 |
dos charset = CP932 |
# ----------------------- Network-Related Options ------------------------- |
# max protocol = used to define the supported protocol. The default is NT1. You |
# can set it to SMB2 if you want experimental SMB2 support. |
# |
workgroup = MYGROUP |
↓ 90行目 自分のWindows環境に合わせます |
workgroup = WORKGROUP |
; hosts allow = 127. 192.168.12. 192.168.13. |
↓ 96行目 コメントを解除して、アクセス許可をするIPアドレスを指定します |
hosts allow = 127. 192.168. |
# ----------------------- Standalone Server Options ------------------------ |
# |
# security = the mode Samba runs in. This can be set to user, share |
# (deprecated), or server (deprecated). |
# |
# passdb backend = the backend used to store user information in. New |
# installations should use either tdbsam or ldapsam. No additional configuration |
# is required for tdbsam. The "smbpasswd" utility is available for backwards |
# compatibility. |
# |
security = user |
passdb backend = tdbsam |
map to guest = Bad User ← 126行目、認証なしの設定の追記をします。 |
#以下すべて最終行に追記します。 |
[Share] #好きな名前 |
path = /home/samba |
writable = yes |
guest ok = yes |
guest only = yes ←すべてゲスト扱い |
create mode = 0777 ←フルアクセスでファイルの作成権限 |
directory mode = 0777 ←フルアクセスでフォルダの作成権限 |
share modes = yes ←排他モード、警告のみ |
サービス起動・有効化 |
[root@ns2 ~]# systemctl start smb |
[root@ns2 ~]# systemctl start nmb |
[root@ns2 ~]# systemctl enable smb |
ln -s '/usr/lib/systemd/system/smb.service' '/etc/systemd/system/multi-user.target.wants/smb.service' |
[root@ns2 ~]# systemctl enable nmb |
ln -s '/usr/lib/systemd/system/nmb.service' '/etc/systemd/system/multi-user.target.wants/nmb.service' |
Windowsからの書き込まれたファイルの確認 |
[root@ns2 samba]# pwd |
/home/samba |
[root@ns2 samba]# ls -l |
合計 12 |
-rwxrw-rw- 1 share share 859 4月 13 16:55 2.contact |
-rwxrw-rw- 1 share share 0 4月 13 16:56 新しいビットマップ イメージ.bmp |
drwxr-xr-x 2 share share 80 4月 13 16:56 新しいブリーフケース |
-rwxrwxrw-+ 1 share share 6351 4月 13 16:56 新規 Microsoft Excel ワークシート.xlsx |
-rwxrw-rw- 1 share share 0 4月 13 16:56 新規 Microsoft PowerPoint プレゼンテーション.pptx |
[root@ns2 samba]# |
★CentOS7 まとめ
★Ubuntu14 まとめ
★Ubuntu12用無線アダプタ紹介
★Ubuntu12 まとめ
★Server 2008R2 まとめ
★SCCM2012R2 まとめ
★Windows10 アップグレード
★Windows7 まとめ
★Windows7 SSD まとめ
★Windows8 まとめ
★EaseUS Todo Backup Server
★Linux Destbision まとめ
★Linuxコマンド関連Index
★Zorin8.1まとめ
★Fedora17まとめ
★Fedora15まとめ
☆VB Script まとめ
★USB3.0で快適バックアップ
★リンク集・メール
・はじめての自宅サーバ構築 - Fedora/CentOS -
SCCM Backup 遠隔操作 VirtualBox FeliCaポート/パソリ ESXi
<%plugin_third_description>
<%plugin_third_content><%plugin_third_description2>