ハピセレぶろぐ

日々、徒然草の記録

ハピセレぶろぐ

Sambaを追加-centos5

Linuxに、Sambaを追加

chkconfig smb on service smb start

chkconfig httpd  on service httpd start

SWATが利用する901番ポートを空ける

yum -y install samba-swat

vi /etc/xinetd.d/swat

default: off

description: SWAT is the Samba Web Admin Tool. Use swat \

              to configure your Samba server. To use SWAT, \

              connect to port 901 with your favorite web browser.

service swat {        port            = 901        socket_type     = stream        wait            = no        only_from       = 127.0.0.1        only_from       = 192.168.0.0/24 (許可するネットワークを追加)        user            = root        server          = /usr/sbin/swat        log_on_failure  += USERID        disable         = no  (変更)

}

/etc/rc.d/init.d/xinetd restart useradd hogehoge passwd hogepass

smbpasswd -a hogehoge New SMB password: Retype new SMB password: Added user hogehoge.

cd /home/ mkdir share chmod 777 share

cd /etc/samba/

vi smb.conf

[public]   path = /home/share   public = yes   only guest = yes   writable = yes   printable = no

  volume = share

service smb restart