[samba] Samba+openldap+slackware
Amrenov K.
musa на sfek.kz
Ср Май 25 13:21:22 MSD 2005
Привет народ.
Или я из ума выжил или дистр пора менять..
Ситуация следующая.
На серевере стояла такая связка Samba 3.0.12 + openldap 2.2.14 + nss_ldap
до позавчерашнего дня все работало ровно
настраивал вот по этому руководству
http://www.idealx.org/prj/samba/smbldap-howto.en.html
только естественно pam_ldap нормально не заработал так как его Патрик не
очень любит.
Сейчас имею.
вот такие вот логи
root на argyn:/usr/sbin# ./smbd -S -i
smbd version 3.0.11 started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
WARNING: The "min passwd length" option is deprecated
===============================================================
INTERNAL ERROR: Signal 11 in pid 8418 (3.0.11)
Please read the appendix Bugs of the Samba HOWTO collection
===============================================================
PANIC: internal error
BACKTRACE: 29 stack frames:
#0 ./smbd(smb_panic2+0x111) [0x81d5381]
#1 ./smbd(smb_panic+0x1a) [0x81d526a]
#2 ./smbd [0x81c2698]
#3 /lib/libc.so.6 [0x4022cdb8]
#4 /usr/local/lib/liblber-2.2.so.7(ber_printf+0x2e0) [0x4004d5b0]
#5 /usr/local/lib/libldap-2.2.so.7(ldap_build_search_req+0xb8)
[0x40026398]
#6 /usr/local/lib/libldap-2.2.so.7(ldap_search+0x5a) [0x4002624a]
#7 /usr/lib/libnss_ldap.so.2 [0x403d21a5]
#8 /usr/lib/libnss_ldap.so.2 [0x403d207e]
#9 /usr/lib/libnss_ldap.so.2 [0x403d2a33]
#10 /usr/lib/libnss_ldap.so.2 [0x403d2bc0]
#11 /usr/lib/libnss_ldap.so.2(_nss_ldap_initgroups_dyn+0xb0) [0x403d3ae0]
#12 /lib/libc.so.6 [0x40289481]
#13 /lib/libc.so.6(initgroups+0x75) [0x40289355]
#14 ./smbd [0x81b93c4]
#15 ./smbd [0x81b9594]
#16 ./smbd(getgroups_user+0x46) [0x81b96e6]
#17 ./smbd(pdb_default_enum_group_memberships+0x29) [0x81b9829]
#18 ./smbd [0x81aef62]
#19 ./smbd [0x81a40e4]
#20 ./smbd(pdb_enum_group_memberships+0x4e) [0x81a587e]
#21 ./smbd [0x82125b2]
#22 ./smbd [0x82126fe]
#23 ./smbd(make_server_info_sam+0x140) [0x82129f0]
#24 ./smbd [0x8212c3b]
#25 ./smbd(init_guest_info+0x34) [0x8212de4]
#26 ./smbd(main+0x282) [0x823d4a2]
#27 /lib/libc.so.6(__libc_start_main+0xb9) [0x40219469]
#28 ./smbd [0x8077271]
Aborted
или если сразу в логах смотреть
[2005/05/25 16:14:06, 0] lib/fault.c:fault_report(36)
===============================================================
[2005/05/25 16:14:06, 0] lib/fault.c:fault_report(37)
INTERNAL ERROR: Signal 11 in pid 8411 (3.0.11)
Please read the appendix Bugs of the Samba HOWTO collection
[2005/05/25 16:14:06, 0] lib/fault.c:fault_report(39)
===============================================================
[2005/05/25 16:14:06, 0] lib/util.c:smb_panic2(1495)
PANIC: internal error
[2005/05/25 16:14:06, 0] lib/util.c:smb_panic2(1503)
BACKTRACE: 29 stack frames:
#0 /usr/sbin/smbd(smb_panic2+0x111) [0x81d5381]
#1 /usr/sbin/smbd(smb_panic+0x1a) [0x81d526a]
#2 /usr/sbin/smbd [0x81c2698]
#3 /lib/libc.so.6 [0x4022cdb8]
#4 /usr/local/lib/liblber-2.2.so.7(ber_printf+0x2e0) [0x4004d5b0]
#5 /usr/local/lib/libldap-2.2.so.7(ldap_build_search_req+0xb8)
[0x40026398]
#6 /usr/local/lib/libldap-2.2.so.7(ldap_search+0x5a) [0x4002624a]
#7 /usr/lib/libnss_ldap.so.2 [0x403d21a5]
#8 /usr/lib/libnss_ldap.so.2 [0x403d207e]
#9 /usr/lib/libnss_ldap.so.2 [0x403d2a33]
#10 /usr/lib/libnss_ldap.so.2 [0x403d2bc0]
#11 /usr/lib/libnss_ldap.so.2(_nss_ldap_initgroups_dyn+0xb0)
[0x403d3ae0]
#12 /lib/libc.so.6 [0x40289481]
#13 /lib/libc.so.6(initgroups+0x75) [0x40289355]
#14 /usr/sbin/smbd [0x81b93c4]
#15 /usr/sbin/smbd [0x81b9594]
#16 /usr/sbin/smbd(getgroups_user+0x46) [0x81b96e6]
#17 /usr/sbin/smbd(pdb_default_enum_group_memberships+0x29) [0x81b9829]
#18 /usr/sbin/smbd [0x81aef62]
#19 /usr/sbin/smbd [0x81a40e4]
#20 /usr/sbin/smbd(pdb_enum_group_memberships+0x4e) [0x81a587e]
#21 /usr/sbin/smbd [0x82125b2]
#22 /usr/sbin/smbd [0x82126fe]
#23 /usr/sbin/smbd(make_server_info_sam+0x140) [0x82129f0]
#24 /usr/sbin/smbd [0x8212c3b]
#25 /usr/sbin/smbd(init_guest_info+0x34) [0x8212de4]
#26 /usr/sbin/smbd(main+0x282) [0x823d4a2]
#27 /lib/libc.so.6(__libc_start_main+0xb9) [0x40219469]
#28 /usr/sbin/smbd [0x8077271]
Я никогда прежде не видел таких ошибок.
Причем перебрал версии самбы начиная с 3.0.9 и включительно по 3.0.14a
собирал по следующему скрипту
root на argyn:/usr/sbin# more
/mnt/distr/os/slackware-current/source/n/samba/samba.SlackBuild
#!/bin/sh
# Build samba for Slackware.
CWD=`pwd`
TMP=/tmp
PKG=$TMP/package-samba
rm -rf $PKG
mkdir -p $PKG
VERSION=3.0.14
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
cd $TMP
rm -rf samba-$VERSION
tar xzf $CWD/samba-$VERSION.tar.gz
cd samba-$VERSION
chown -R root.root .
find . -perm 775 | xargs chmod 755
find . -perm 664 | xargs chmod 644
## CUPS is a standard package now, so we *like* this dependency. :-)
if [ -r /usr/lib/libcups.so ]; then
echo
echo "We've found libcups on your system."
echo
echo "Hit enter to build a version of samba with CUPS support"
echo -n "(and with a CUPS dependency): "
read foo
CUPS="--enable-cups"
fi
cd source
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
# Some of these options could be auto-detected, but declaring them
# here doesn't hurt and helps document what features we're trying to
# build in.
CFLAGS="$SLKCFLAGS" ./configure \
--with-automount=yes \
--enable-cups \
--prefix=/usr \
--localstatedir=/var \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--with-lockdir=/var/cache/samba \
--sysconfdir=/etc \
--with-configdir=/etc/samba \
--with-privatedir=/etc/samba/private \
--with-swatdir=/usr/share/swat \
--with-smbmount \
--with-ldapsam=yes \
$ARCH-slackware-linux
# -j options don't seem to work...
make
mkdir -p \
$PKG/usr/doc/samba-$VERSION/swat \
$PKG/var/spool/samba \
$PKG/var/log/samba \
$PKG/etc/samba/private \
$PKG/var/cache/samba
chmod 700 $PKG/etc/samba/private
chmod 1777 $PKG/var/spool/samba
make install DESTDIR=$PKG
# I almost think this is cruft. Almost.
mkdir -p $PKG/sbin
( cd $PKG/sbin
rm -f mount.smbfs
ln -sf /usr/bin/smbmount mount.smbfs
chown -R root.bin .
)
cat $CWD/smb.conf.default > $PKG/etc/samba/smb.conf-sample
if [ ! -r $PKG/usr/bin/smbget ]; then
rm -f $PKG/usr/share/man/man1/smbget.1
rm -f $PKG/usr/share/swat/help/smbget.1.html
fi
# We'll add rc.samba to the init directory, but chmod 644 so that it doesn't
# start by default:
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.samba > $PKG/etc/rc.d/rc.samba.new
chmod 644 $PKG/etc/rc.d/rc.samba.new
mv $PKG/usr/share/man $PKG/usr
gzip -9 $PKG/usr/man/man?/*.?
chown -R root.bin $PKG/usr/bin $PKG/usr/sbin
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : |
xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d :
| xargs strip --strip-unneeded 2> /dev/null
)
cd ..
cp -a COPYING Manifest README Read-Manifest-Now Roadmap WHATSNEW.txt
docs examples \
$PKG/usr/doc/samba-$VERSION
# These are installed elsewhere:
rm -rf $PKG/usr/doc/samba-$VERSION/docs/htmldocs \
$PKG/usr/doc/samba-$VERSION/docs/manpages
( cd $PKG/usr/doc/samba-$VERSION/docs
ln -sf /usr/share/swat/using_samba .
ln -sf /usr/share/swat/help htmldocs
)
# I'm sorry, but when all this info is included in HTML, adding 7MB worth of
# PDF files just to have extra artwork is more fluff than I'll agree to.
rm -f $PKG/usr/doc/samba-$VERSION/docs/*.pdf
# Also redundant also:
rm -rf $PKG/usr/doc/samba-$VERSION/docs/docbook
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat << EOF
*** Be sure the package contains:
drwx------ 2 root root 1024 Mar 12 13:21 /etc/samba/private
drwxr-xr-x 2 root root 4096 May 3 15:46 /var/cache/samba/
drwxr-xr-x 2 root root 48 Aug 29 13:06 /var/log/samba/
drwxrwxrwt 2 root root 1024 Mar 12 13:21 /var/spool/samba/
EOF
cd $PKG
makepkg -l y -c n $TMP/samba-$VERSION-$ARCH-$BUILD.tgz
Скрипт взят у Патрика просто включена поддержка ldapsam
Сам openldap и nss_ldap прекрасно работают.
Извините за большой объем письма, но возможно это поможет решению проблемы.
З.Ы. glibc тоже все перебрал везде один и тот же результат
----------- следущая часть -----------
Было удалено вложение не в текстовом формате...
Имя : musa.vcf
Тип : text/x-vcard
Размер : 263 байтов
Описание: отсутствует
Url : http://lists.altlinux.ru/pipermail/samba/attachments/20050525/b91aa679/musa.vcf
Подробная информация о списке рассылки Samba