玄箱のsambaを入れ替えてしまうと、標準の玄箱の使い方と違う動きをするように なってしまいます。sambaの設定に慣れていない方はインストールしないで下さい。
玄箱のsambaは起動時に勝手に一部の設定を書き換えているようなので、 /usr/local/samba/ にインストールする。
tar zxf samba-2.2.12.tar.gz cd samba-2.2.12/ cd source/ ./configure --with-smbmount make su make install
/usr/local/samba/lib/smb.conf
[global] printing = bsd printcap name = /etc/printcap load printers = yes log file = /usr/local/samba/var/log.%m lock directory = /usr/local/samba/var/locks share modes = yes client code page = 932 coding system = euc [homes] comment = Home Directories browseable = no read only = no create mode = 0754 [tmp] comment = Public Stuff path = /tmp public = yes writable = yes printable = no
#!/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=/usr/local/samba/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Avoid using root's TMPDIR
unset TMPDIR
# Check that smb.conf exists.
# [ -f /etc/samba/smb.conf ] || exit 0
[ -f /usr/local/samba/lib/samba/smb.conf ] || exit 0
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
echo "Start services: smbd nmbd"
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
}
stop()
{
echo "Stop services: smbd nmbd"
/sbin/killall "/usr/local/samba/bin/smbd" > /dev/null 2>&1
/sbin/killall "/usr/local/samba/bin/nmbd" > /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
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: /etc/init.d/smb {start|stop|restart}" >&2
exit 1
;;
esac
exit 0
$ tar zxf samba-2.2.11-ja-1.0.tar.gz $ cd samba-2.2.11-ja-1.0/source
$ date Mon Jan 31 21:41:23 JST 2005 $ ./configure --with-smbmount ... ... $ date Mon Jan 31 21:48:13 JST 2005
$ date Tue Feb 1 07:01:37 JST 2005 $ make && date ... ... Tue Feb 1 07:43:44 JST 2005
$ su # make install