« ソースコード | メイン | samba3.0+libiconvパッチ »
2006年02月09日
samba3.0
TeraStation
TeraStationに入っているsambaは2.2なので3.0をコンパイルしてみました。
あまり速度は変わった気がしませんが機能はいくらか増えているようなので良しとします。
以下に生成物を置いておきます。保証は出来ませんので各自バックアップを取るなどしてください。
実行ファイル+ライブラリ
必ずすること
・上記ファイルをルートディレクトリにて展開してください。
cd /;tar xzvpf /mnt/array1/share/samba3_all.taz
・/etc/smbは適当に設定してください。
特にcharsetの設定を追加するのを忘れないでください。
私は以下のようにしています。
[global]
dos charset = cp932
unix charset = cp932
display charset = cp932
netbios name = HD-HTGL8A9
server string = TeraStation
socket options = TCP_NODELAY SO_SNDBUF=32768 SO_RCVBUF=32768
os level = 1
wins server =
workgroup = WORKGROUP
security = user
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = yes
guest account = nobody
null passwords = yes
guest only = no
password level = 14
map to guest = Bad User
veto files = /.AppleDesktop/Network Trash Folder/TheVolumeSettingsFolder/.AppleDouble/.AppleDB/
delete veto files = yes
deadtime = 15
invalid users = mail, deamon
admin users = root
username map = /etc/samba/smbusers
log level = 1
max log size = 10
printcap name = /etc/printcap
load printers = yes
printing = lprng
[lp]
comment = Network Printer for Windows
path = /mnt/array1/spool/samba
print command = /usr/bin/lpr -Plp -r %s
printer admin = admin
browsable = yes
printable = yes
public = yes
[info]
comment = TeraStation utilities
path = /mnt/info
browsable = yes
printable = no
writable = no
guest ok = yes
[usbdisk1]
comment = USB Disk1
path = /mnt/usbdisk1
browsable = yes
printable = no
writable = yes
valid users = ryu,@local
force create mode = 777
force directory mode = 777
[share]
comment = TeraStation folder
path = /mnt/array1/share
browsable = yes
printable = no
writable = yes
valid users = ryu,@local
force create mode = 777
force directory mode = 777
###share###
#####END#####
・/etc/init.d/smbを修正して起動するフォルダを変更してください。
#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
#
# pidfile: /var/run/smbd.pid
# pidfile: /var/run/nmbd.pid
# config: /etc/samba/smb.conf
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Avoid using root's TMPDIR
unset TMPDIR
tag=terastation
facility=user.info
# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 0
# Check that info exists.
[ -f /etc/melco/info ] || exit 0
. /etc/melco/info > /dev/null 2>&1
start()
{
if [ -f /var/run/smbd.pid ] ; then
rm -f /var/run/smbd.pid
fi
if [ -f /var/run/nmbd.pid ] ; then
rm -f /var/run/nmbd.pid
fi
if [ -f /var/run/winbindd.pid ] ; then
rm -f /var/run/winbindd.pid
fi
if [ $domain = on ] ; then
echo "Start services: smbd nmbd winbindd"
/usr/local/samba/sbin/smbd -D
/usr/local/samba/sbin/nmbd -D
/usr/local/samba/sbin/winbindd
logger -t ${tag} -p ${facility} -i 'Started smbd nmbd winbindd'
else
echo "Start services: smbd nmbd"
/usr/local/samba/sbin/smbd -D
/usr/local/samba/sbin/nmbd -D
logger -t ${tag} -p ${facility} -i 'Started smbd nmbd'
fi
}
stop()
{
if [ $domain = on ] ; then
echo "Stop services: smbd nmbd winbindd"
else
echo "Stop services: smbd nmbd"
fi
/usr/bin/killall "smbd" > /dev/null 2>&1
/usr/bin/killall "nmbd" > /dev/null 2>&1
/usr/bin/killall "winbindd" > /dev/null 2>&1
if [ -f /var/run/smbd.pid ] ; then
rm -f /var/run/smbd.pid
fi
if [ -f /var/run/nmbd.pid ] ; then
rm -f /var/run/nmbd.pid
fi
if [ -f /var/run/winbindd.pid ] ; then
rm -f /var/run/winbindd.pid
fi
logger -t ${tag} -p ${facility} -i 'Stopped smbd nmbd winbindd'
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Usage: /etc/init.d/smb {start|stop|restart}" >&2
exit 1
;;
esac
exit 0
必要に応じてすること
・swatも同胞してありますので使いたい人は適切に設定してください。(未確認)
・webからの制御と同期を取りたい場合は/www/modules以下を適切に設定してください。(私は使ってないので。。)
投稿者 tattsuu : 2006年02月09日 23:29
トラックバック
このエントリーのトラックバックURL:
http://tattsuu.com/mt/mt-tb.cgi/37
» Tramadol dog. from Tramadol and depression.
Tramadol. [続きを読む]
トラックバック時刻: 2007年11月09日 06:27
» Percocet. from Percocet.
Percocet 93-490. Percocet addiction .og. Effects of long term percocet use. P... [続きを読む]
トラックバック時刻: 2007年11月11日 13:42
» Ultram. from Ultram.
Ultram. Ultram er. Ultram 200 er. Ultram starting from per pill. Side effects... [続きを読む]
トラックバック時刻: 2007年11月12日 21:36
» Lexapro. from Lexapro 10mg.
Lexapro. Side effects of drug lexapro. [続きを読む]
トラックバック時刻: 2007年11月15日 01:09
» Cialis. from Cialis best price buy online.
Cialis. [続きを読む]
トラックバック時刻: 2007年11月15日 16:47
» Wellbutrin. from Anxiety and wellbutrin.
Wellbutrin xl pregnancy. Smoking marijuana and taking wellbutrin. Wellbutrin ... [続きを読む]
トラックバック時刻: 2007年11月18日 16:34
コメント
と言いつつも、僕もコンパイルしてみました。
とりあえず、LDAPのユーザでアクセスできる模様。
いろいろいじってて分かったんですが、smb.confは
/usr/local/samba/lib/smb.conf
の方読んでますよね。(そちらで配布されてるやつは)
オプション指定してコンパイルしないと、ログなんかも
/usr/local/samba/var/log/
とかに吐くみたいですね。
投稿者 mmatsu : 2006年06月17日 06:11