クライアントからSAMBAの接続ができない
お世話になります
クライアントからSAMBAの接続ができません。
どこが悪いのかご教授頂けないでしょうか?
またこれ以外どこを調べればいいでしょうか?
1,環境
サーバ:
・CENTOS6.9
・192.168.0.18(DHCPで現在このIP)
・hoge-hoge
クライアント:
・Windows10
・192.168.0.12
・CLIENT-PC
Sambaのバージョン
・Version 3.6.23-45.el6_9
2,インストール手順
①ポート開放
下記を追加
-A INPUT -p tcp --dport 139 -j ACCEPT
-A INPUT -p udp --dport 137 -j ACCEPT
-A INPUT -p udp --dport 138 -j ACCEPT
-A INPUT -p tcp --dport 445 -j ACCEPT
②SELINUX変更
SELINUXをdisabled
vi /etc/selinux/config
SELINUX=disabled
③ホスト変更
vi /etc/hosts
192.168.0.18 hoge-hoge
を追加
④Sambaインストール
sudo yum -y samba
⑤Samba設定
mkdir /home/hoge-hoge
chmod 777 /home/hoge-hoge
vi /etc/samba/smb.conf
------------------------------
・[global]の先頭に2行追記
unix charset = UTF-8
dos charset = CP932
・workgroup変更 ( Windowsに合わせる )
workgroup = WORKGROUP
・アクセス許可するIPに変更
hosts allow = 127. 192.168.0.
・変更
security = share
・最終行に以追記
[HOGE-GOGE]#
path = /home/hoge-hoge#
writable = yes#
guest ok = yes#
guest only = yes#
create mode = 0777#
directory mode = 0777#
share modes = yes
3,
①\\192.168.0.18\hoge-hogeにアクセス
→\\192.168.0.18\hoge-hogeにアクセスできません。
と表示
②クライアントからping
ping 192.168.0.18→ ok
ping CLIENT-PC→ ok
③サーバから
ping 192.168.0.12→ ok
ping CLIENT-PC→ NG
④ポート
sudo netstat -anp | grep smbd
sudo netstat -anp | grep nmbd
で
確認→問題なし
⑤クライアント側のWindowsから見えない
⑥netenum などのツールからはhoge-hogeが見えます
追記
testparmを実行すると
testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[HOGE-HOGE]"
lp_bool(yes# 書き込みOK): value is not boolean!
lp_bool(yes# ゲストユーザーOK): value is not boolean!
lp_bool(yes# 全てゲストとして扱う): value is not boolean!
WARNING: The "share modes" option is deprecated
WARNING: The security=share option is deprecated
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
dos charset = CP932
server string = Samba Server Version %v
security = SHARE
log file = /var/log/samba/log.%m
max log size = 50
client signing = required
idmap config * : backend = tdb
hosts allow = 127., 192.168.0.
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
print ok = Yes
browseable = No
[HOGE-HOGE]
path = /home/HOGE-HOGE# 共有フォルダ指定
create mask = 0777
directory mask = 0777
mount //localhost/hoge-homge /mnt
を実行すると
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
と表示されます
ログですが
cat log.smbd
[2017/12/19 12:47:07, 0] smbd/server.c:1054(main)
smbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:19:34, 0] smbd/server.c:1054(main)
smbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:19:34.303080, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# 書き込みOK): value is not boolean!
[2017/12/19 13:19:34.303475, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# ゲストユーザーOK): value is not boolean!
[2017/12/19 13:19:34.303724, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# 全てゲストとして扱う): value is not boolean!
[2017/12/19 13:28:07, 0] smbd/server.c:1054(main)
smbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:28:07.629718, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# 書き込みOK): value is not boolean!
[2017/12/19 13:28:07.629789, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# ゲストユーザーOK): value is not boolean!
[2017/12/19 13:28:07.629860, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# 全てゲストとして扱う): value is not boolean!
[2017/12/19 13:38:57, 0] smbd/server.c:1054(main)
smbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:38:57.347976, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# 書き込みOK): value is not boolean!
[2017/12/19 13:38:57.348345, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# ゲストユーザーOK): value is not boolean!
[2017/12/19 13:38:57.348603, 0] param/loadparm.c:6232(lp_bool)
lp_bool(yes# 全てゲストとして扱う): value is not boolean!
cat log.nmbd
[2017/12/19 12:47:07, 0] nmbd/nmbd.c:861(main)
nmbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 12:47:30, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****
Samba name server HOGE-HOGE is now a local master browser for workgroup MYGROUP on subnet 192.168.0.18
*****
[2017/12/19 13:19:39, 0] nmbd/nmbd.c:66(terminate)
Got SIGTERM: going down...
[2017/12/19 13:19:39, 0] nmbd/nmbd.c:861(main)
nmbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:20:02, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****
Samba name server HOGE-HOGE is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.18
*****
[2017/12/19 13:27:11, 0] nmbd/nmbd.c:66(terminate)
Got SIGTERM: going down...
[2017/12/19 13:28:07, 0] nmbd/nmbd.c:861(main)
nmbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:28:31, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****
Samba name server HOGE-HOGE is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.18
*****
[2017/12/19 13:39:01, 0] nmbd/nmbd.c:66(terminate)
Got SIGTERM: going down...
[2017/12/19 13:39:01, 0] nmbd/nmbd.c:861(main)
nmbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/12/19 13:39:25, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****
Samba name server HOGE-HOGE is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.18
*****
追記
#以降をとりました
[HOGE-HOGE]
path = /home/hoge-hoge
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
share modes = yes
testparmを実行すると
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[hoge-hoge]"
WARNING: The "share modes" option is deprecated
WARNING: The security=share option is deprecated
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
cat log.smbd
smbd version 3.6.23-45.el6_9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
cat log.nmbd
nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****
Samba name server HOGE-HOGE is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.18
*****