On 5/3/06, Steve Langasek <[EMAIL PROTECTED]> wrote:
> $ ll -R /var/run/samba
> /var/run/samba:
> total 4.0K
> drwxr-xr-x 2 root root 4.0K Jan 11 11:19 perfmon
What are the permissions on the directory itself?
$ ll /var/run/samba -d
drwxr-xr-x 3 root root 4.0K May 2 01:04 /var/run/samba
Have you tried restarting samba? These files should be created when samba
first starts; if these error messages are coming from child processes forked
off by samba, perhaps the problem is that something on your system has
(wrongly) deleted the files from /var/run/samba and that's why it's failing?
Yes, I've tried restarting samba. I even tried 'aptitude reinstall
samba' earlier.
Things are getting a little bit complex now:
(1) After restarting samba, the directory /var/run/samba still only
contains an empty perfmon/. No error messages show up in
/var/log/samba/log.smbd before I mount this samba share in another
Windows box. After mounting it in Windows, I found this showing up in
/var/log/samba/log.smbd, which looks similar to what I have reported
in the first mail:
[2006/05/03 02:16:03, 0] tdb/tdbutil.c:tdb_log(772)
tdb(/var/run/samba/gencache.tdb): tdb_reopen: open failed (No such
file or directory)
[2006/05/03 02:16:04, 0] smbd/server.c:open_sockets_smbd(432)
tdb_reopen_all failed.
[2006/05/03 02:16:04, 0] lib/util.c:smb_panic2(1544)
smb_panic(): calling panic action [/usr/share/samba/panic-action 17125]
[2006/05/03 02:16:22, 0] lib/util.c:smb_panic2(1552)
smb_panic(): action returned status 0
[2006/05/03 02:16:22, 0] lib/util.c:smb_panic2(1554)
PANIC: tdb_reopen_all failed.
[2006/05/03 02:16:23, 0] lib/util.c:smb_panic2(1562)
BACKTRACE: 5 stack frames:
#0 /usr/sbin/smbd(smb_panic2+0x7c) [0x821eedc]
#1 /usr/sbin/smbd(smb_panic+0x1a) [0x821f0fa]
#2 /usr/sbin/smbd(main+0xd7e) [0x82b500e]
#3 /lib/tls/libc.so.6(__libc_start_main+0xd0) [0xb7c2beb0]
#4 /usr/sbin/smbd [0x807eb21]
[2006/05/03 02:16:33, 0] tdb/tdbutil.c:tdb_log(772)
tdb(/var/run/samba/gencache.tdb): tdb_reopen: open failed (No such
file or directory)
[2006/05/03 02:16:33, 0] smbd/server.c:open_sockets_smbd(432)
tdb_reopen_all failed.
[2006/05/03 02:16:33, 0] lib/util.c:smb_panic2(1544)
smb_panic(): calling panic action [/usr/share/samba/panic-action 17139]
[2006/05/03 02:16:41, 0] lib/util.c:smb_panic2(1552)
smb_panic(): action returned status 0
[2006/05/03 02:16:41, 0] lib/util.c:smb_panic2(1554)
PANIC: tdb_reopen_all failed.
[2006/05/03 02:16:41, 0] lib/util.c:smb_panic2(1562)
BACKTRACE: 5 stack frames:
#0 /usr/sbin/smbd(smb_panic2+0x7c) [0x821eedc]
#1 /usr/sbin/smbd(smb_panic+0x1a) [0x821f0fa]
#2 /usr/sbin/smbd(main+0xd7e) [0x82b500e]
#3 /lib/tls/libc.so.6(__libc_start_main+0xd0) [0xb7c2beb0]
#4 /usr/sbin/smbd [0x807eb21]
(2) If I manually kill all the smbd and nmbd processes, and then
'/etc/init.d/samba start', I get:
# /etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd failed!
Meanwhile, things show up in /var/log/samba/log.smbd:
[2006/05/03 02:41:49, 0] smbd/server.c:main(805)
smbd version 3.0.22 started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
[2006/05/03 02:41:51, 0] smbd/server.c:main(829)
ERROR: failed to setup guest info.
What's more, two files (messages.tdb and nmbd.pid) show up in /var/run/samba/:
$ ll /var/run/samba/ -d
drwxr-xr-x 3 root root 4.0K May 3 02:33 /var/run/samba/
$ ll /var/run/samba/ -R
/var/run/samba/:
total 12K
-rw------- 1 root root 696 May 3 02:33 messages.tdb
-rw-r--r-- 1 root root 6 May 3 02:33 nmbd.pid
drwxr-xr-x 2 root root 4.0K Jan 11 11:19 perfmon
/var/run/samba/perfmon:
total 0
(3) Then I tried to do another reinstall of the samba package, while
unexpected errors happen:
# aptitude update
# aptitude reinstall samba
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages have been kept back:
bind9-host console-tools cpp debianutils dnsutils ethereal
ethereal-common exim4 exim4-base exim4-config exim4-daemon-light
fontconfig g++ gcc gcc-4.1-base gkrellm gnome-terminal
gnome-terminal-data libbonoboui2-0 libbonoboui2-common libcamel1.2-6
libconsole libdmx1 libebook1.2-5 libedataserver1.2-4 libegroupwise1.2-8
libfontconfig1 libgcc1 libgcj-common libglu1-xorg libgnome-desktop-2
libgnome2-0 libgnome2-common libgnomeui-0 libgnomeui-common
libgnomevfs2-0 libgnomevfs2-common libhal-storage1 libhal1 libiodbc2
libmetacity0 libnautilus-extension1 libncurses5 libncursesw5 librsvg2-2
librsvg2-common libstdc++6 libtiff4 libwxgtk2.6-0 libx11-6 libxdmcp6
libxfixes3 libxft2 libxklavier10 linux-image-2.6-686 mc metacity
ncurses-base ncurses-bin ncurses-term openjade parted portmap python-newt
sp ssl-cert thunar util-linux w3m whiptail x-window-system
x-window-system-core x11-common xbase-clients xfonts-100dpi xfonts-75dpi
xfonts-base xfonts-scalable xfs xlibmesa-dri xlibmesa-gl xlibs-data xmms
xnest xprint xprint-common xserver-xorg xterm xutils xvfb
The following packages will be REINSTALLED:
samba
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and
90 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up samba (3.0.22-1) ...
Starting Samba daemons: nmbd smbd failed!
invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing samba (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up samba (3.0.22-1) ...
Starting Samba daemons: nmbd smbd failed!
invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing samba (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
samba
--
Best regards,
James He