sambaの設定

sambaをインストール

yumでインストール

# yum install samba

smb.confの設定

以下の設定を適当な位置に追加

# vi /etc/samba/smb.conf

[global]
        unix charset = UTF-8
        dos charset = CP932
        display charset = UTF-8

〜〜

        security = share
        passdb backend = tdbsam


〜〜

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes

〜〜

[public]
        comment = Public Stuff
        path = /home/public
        public = yes
        writable = yes
        only guest = yes
        vfs objects = recycle
        recycle:repository = .recycle
        recycle:keeptree = no
        recycle:versions = yes
        recycle:touch = no
        recycle:maxsize = 0
        recycle:exclude = *.tmp ~$*
        force user = sai
        force group = sai
        directory mask = 0775
        create mask = 0664

sambaを起動

# /etc/init.d/smb start

動作確認

# /etc/init.d/smb status

自動起動の設定

# chkconfig --add smb

# chkconfig --list | grep smb
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off

# chkconfig --level 35 smb on

# chkconfig --list | grep smb
smb             0:off   1:off   2:off   3:on    4:off   5:on    6:off