Debian 6.0(squeeze)のVMwareでのセットアップ
サーバ環境をエミュレートするために、諸々入れる。
sshインストール
# apt-get install ssh
Sambaインストール&初期設定
# apt-get install samba # cd /etc/samba/ # cp smb.conf smb.conf.orig # vi smb.conf # diff -u smb.conf.orig smb.conf --- smb.conf.orig 2011-02-28 08:06:16.000000000 +0900 +++ smb.conf 2011-02-28 08:15:59.000000000 +0900 @@ -60,16 +60,16 @@ # The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred -; interfaces = 127.0.0.0/8 eth0 + interfaces = 127.0.0.0/8 eth0 192.168.1.0/24 # Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. -; bind interfaces only = yes - + bind interfaces only = yes +hosts allow = 192.168.1.0/24 #### Debugging/Accounting #### @@ -99,7 +99,7 @@ # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. -# security = user + security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. @@ -114,7 +114,7 @@ # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. - unix password sync = yes + unix password sync = no # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for @@ -231,6 +231,10 @@ # Maximum number of usershare. 0 (default) means that usershare is disabled. ; usershare max shares = 100 +# client encoding-setting +client code page = 932 +#coding system = SJIS + #======================= Share Definitions ======================= [homes] @@ -239,15 +243,16 @@ # By default, the home directories are exported read-only. Change the # next parameter to 'no' if you want to be able to write to them. - read only = yes + read only = no + writable = yes # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. - create mask = 0700 + create mask = 0744 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. - directory mask = 0700 + directory mask = 0755 # By default, \\server\username shares can be connected to by anyone # with access to the samba server. @@ -256,6 +261,10 @@ # This might need tweaking when using external authentication schemes valid users = %S +# user security +security = yes +encrypt passwords = yes + # Un-comment the following and create the netlogon directory for Domain Logons # (you need to configure Samba to act as a domain controller too.) ;[netlogon] # service samba restart
Apacheインストール&CGI設定
# apt-get install apache2 # vi /etc/apache2/mods-enabled/mime.conf AddHandler cgi-script .cgi .py