*

とりあえず使う

公開日: : Samba

/etc/samba/smb.conf を編集

#======================= Global Settings =====================================

[global]
        unix charset = UTF-8
    dos charset = CP932
# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
        workgroup = WORKGROUP
        server string = Samba Server Version %v

        netbios name = cent

        interfaces = lo eth0 192.168.20.200/24
        hosts allow = 127. 192.168.20.

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

        security = share
        passdb backend = tdbsam




[htdocs]
    comment = web page
    path = /opt/lampp/htdocs
    browseable = yes
    writable = yes
    guest ok = yes
    guest only = yes
    create mode = 0777
    directory mode = 0777

ポートを空ける

iptables -A INPUT -p udp --dport 137 -j ACCEPT
iptables -A INPUT -p udp --dport 138 -j ACCEPT
iptables -A INPUT -p tcp --dport 139 -j ACCEPT
iptables -A INPUT -p tcp --dport 445 -j ACCEPT
iptables save
service iptables restart

参考

cat /etc/sysconfig/iptables
# Generated by iptables-save v1.4.7 on Sun Feb 15 14:43:26 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4:688]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 138 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 139 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

admax_area



関連記事

no image

Samba3以前 調べたことまとめ

Sambaの概要 Windowsのファイル共有機能を提供するオープンソフトウェア。ファイルサーバ、

記事を読む

no image

sambaのインストール

はじめに yumコマンドでもできる方法があるようだが、うまくいかない。 インストール wg

記事を読む

admax_area



Message

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA


日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)

admax_area



PAGE TOP ↑