Samba upgrade failure due to broken rc.d symlinks

Bug #9208 reported by Chris
170
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Fix Released
High
Sebastien Bacher

Bug Description

I upgraded on Mon Oct 18 (West Australian time) using a Default Upgrade. I get
the following error:

Preconfiguring packages ...
Selecting previously deselected package samba.
(Reading database ... 65896 files and directories currently installed.)
Preparing to replace samba 3.0.7-1ubuntu5 (using
.../samba_3.0.7-1ubuntu6_i386.deb) ...
invoke-rc.d: dangling symlink: /etc/rc2.d/S91samba
dpkg: warning - old pre-removal script returned error exit status 102
dpkg - trying script from the new package instead ...
invoke-rc.d: dangling symlink: /etc/rc2.d/S91samba
dpkg: error processing /var/cache/apt/archives/samba_3.0.7-1ubuntu6_i386.deb
(--unpack):
 subprocess new pre-removal script returned error exit status 102
Errors were encountered while processing:
 /var/cache/apt/archives/samba_3.0.7-1ubuntu6_i386.deb

Failed to apply all changes! Scroll in this buffer to see what went wrong

Revision history for this message
Matt Zimmerman (mdz) wrote :

Something is causing /etc/init.d/samba to be deleted. A number of users are
reporting this, but it clearly seems to be a problem external to the samba package.

gnome-system-tools seems to have a checkbox for "enable Windows networking";
perhaps it is deleting this file?

Revision history for this message
Matt Zimmerman (mdz) wrote :

*** Bug 9192 has been marked as a duplicate of this bug. ***

Revision history for this message
Matt Zimmerman (mdz) wrote :

I tried and can't reproduce it that way.

We need to know if any of you who are experiencing this bug have made any
changes to your system which might be related. Anything you have done which
concerns Windows networking or samba, we need to know about it in order to find
the bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've played a bit with the network-admin too/read a part of the code
and not found any problem here for the moment ...

Revision history for this message
Chris (chris-tognela) wrote :

I'm only using Samba and ipmasq to share the resources and the Internet connection. Two previous
upgrades have gone without a hitch. I did have a similar problem with Samba not upgrading a while
back, but that was put down to an incorrect install.

This is my second install of Ubuntu, and the first problem I have encountered with upgrades on
this install, if you follow. :)

Cheers,
chris

Revision history for this message
Matt Zimmerman (mdz) wrote :

OK, so the questions are:

- What changed since the previous time you upgraded samba?
- What is different between this system, and the other where the upgrade did not
fail (if I understand correctly)?

Revision history for this message
richard (raraujo) wrote :

hi

even with this package that is broken I can print on printers that are connected
to windows machines.
I have some others packages that are installed:
samba-common
smbclient
smbfs
libsmbclient

Each time I launch synaptic, he tells me that samba package is broken.

I have done canges with network-admin by trying to say to accept windows
workgroups. but I don't thing this is the error

i also installed vmware that automatically configure samba for access to the
windows network machines,
I don't know if vmware configuration my have do something wrong.

I also have seen that in /etc/rc2.d I have a K09samba link that is broken

Richard

Revision history for this message
Matt Zimmerman (mdz) wrote :

The samba package does not, and has never, created an /etc/rc2.d/K09samba
symlink. The bug is in some other package, which creates this faulty link.
Please send the output from:

ls -l /etc/rc?.d/*samba
ls -l /etc/init.d/samba
dpkg -l

Revision history for this message
Matt Zimmerman (mdz) wrote :

I suspect that the bug is caused by some sort of administration tool...have you
used anything like that?

Revision history for this message
richard (raraujo) wrote :

Created an attachment (id=549)
listing of some commands

Revision history for this message
Chris (chris-tognela) wrote :

I have just completed a re-install of Ubuntu. I did a default upgrade using
Synaptic. I would post the error I get when installing, but I didn't do a copy :(

When trying to remove Samba, I get this error:

Removing samba ...
invoke-rc.d: dangling symlink: /etc/rc2.d/K09samba
dpkg: error processing samba (--purge):
 subprocess pre-removal script returned error exit status 102

I cannot remove Samba. It appears that Samba works, because I can see the shares
of my XP Home machine.

When installing apache2-mpm-prefork and the php4 package, this error comes up
about Samba:

Setting up samba (3.0.7-1ubuntu6) ...
update-rc.d: warning: /etc/rc2.d/K09samba is not a link to ../init.d/samba
update-rc.d: warning: /etc/rc3.d/K09samba is not a link to ../init.d/samba
invoke-rc.d: dangling symlink: /etc/rc2.d/K09samba
dpkg: error processing samba (--configure):
 subprocess post-installation script returned error exit status 102

Hope that helps
chris

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #10)
> Created an attachment (id=549) [edit]
> listing of some commands
>

Thanks. Could you also send the output from "dpkg --get-selections"? I need
the full package names.

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #11)
> I have just completed a re-install of Ubuntu. I did a default upgrade using
> Synaptic. I would post the error I get when installing, but I didn't do a copy :(
>
> When trying to remove Samba, I get this error:
>
> Removing samba ...
> invoke-rc.d: dangling symlink: /etc/rc2.d/K09samba
> dpkg: error processing samba (--purge):
> subprocess pre-removal script returned error exit status 102

Yes, others have experienced this problem as well. What we need to determine is
how your system came to be in this broken state.

You say you got an error during installation? Please attach a copy of the
/var/log/base-config.log file from your system.

Revision history for this message
Matt Zimmerman (mdz) wrote :

A note to anyone experiencing this bug:

You do not need the 'samba' package installed in order to print to Windows
printers, or access file shares on Windows systems. The only reason to install
it is to provide those services FROM Ubuntu TO Windows systems.

Revision history for this message
richard (raraujo) wrote :

hi

I could now finally update my samba package.

I have removed the two broken links:
/etc/rc2.d/K09samba
/etc/rc3.d/K09samba

and then I have created two new links:
ln -s /etc/rc2.d/K09samba /etc/init.d/samba
ln -s /etc/rc3.d/K09samba /etc/init.d/samba

and then I went again to synaptic and make the update and it worked, but it has
done many operations, but now it seems all is OK, I know that this doesn't solve
the bug, but at least we can update samba without any problem and know the
package is no more broken.

Revision history for this message
richard (raraujo) wrote :

Created an attachment (id=563)
dpkg --get-selection

here is the dpkg --get-selection output

Revision history for this message
Matt Zimmerman (mdz) wrote :

OK, I compared your list to my own, and considered each of the packages that you
have installed that I have not installed, and found none of them particularly
suspicious.

I just noticed that you mentioned vmware some time ago. I know that vmware has
in the past made changes to the system startup scripts, and I suspect that it
may be the cause of the problem. Has anyone else who is experiencing this bug
installed vmware?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Since all indications are that this is not an Ubuntu problem, and no one has
been able to supply enough information to track it down, I'm downgrading it.

By rights it should be closed, but it would be good to find out what is causing
this, so that we have an answer for it in the future.

Revision history for this message
Suzan (suzan72) wrote :

(In reply to comment #15)
> hi
>
> I could now finally update my samba package.
>
> I have removed the two broken links:
> /etc/rc2.d/K09samba
> /etc/rc3.d/K09samba
>
> and then I have created two new links:
> ln -s /etc/rc2.d/K09samba /etc/init.d/samba
> ln -s /etc/rc3.d/K09samba /etc/init.d/samba
>

I've got exactly the same problem with the samba-package. An an I thank you -
your solution worked perfekt! I only have to remove the broken links manually
and it works again.
The only thing i have installed a few days ago ist a driver for my wlan-card
from linuxant. But can this cause this problem? I don't know....

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #19)
> I've got exactly the same problem with the samba-package. An an I thank you -
> your solution worked perfekt! I only have to remove the broken links manually
> and it works again.
> The only thing i have installed a few days ago ist a driver for my wlan-card
> from linuxant. But can this cause this problem? I don't know....

No, that driver is unlikely to be the cause of the problem. Can you remember
anything else that you changed?

This problem does not seem to occur on fresh Warty installs, nor on upgrades
from Debian Woody; some external factor is involved.

Revision history for this message
Andrew Zajac (arzajac) wrote :

I have the same problem.

I checked my /var/log/auth.log and found that the symlink was created at the
same time as network-admin was run by sudo.

Here is a list of files that were created at the same time:
ls -R -l /|grep 2004-11-08

lrwxrwxrwx 1 root root 6 2004-11-08 21:41 K09samba -> /samba
lrwxrwxrwx 1 root root 6 2004-11-08 21:41 K09samba -> /sambad
--------- 3 root root 4096 2004-11-08 21:43 8
d--------- 3 root root 4096 2004-11-08 21:40 9
d--------- 4 root root 4096 2004-11-08 21:43 etc
-rw-r--r-- 1 root root 26 2004-11-08 21:43 host.conf
-rw-r--r-- 1 root root 7 2004-11-08 21:43 hostname
-rw-r--r-- 1 root root 240 2004-11-08 21:43 hosts
d--------- 2 root root 4096 2004-11-08 21:43 network
-rw-r--r-- 1 root root 39 2004-11-08 21:43 pump.conf
-rw-r--r-- 1 root root 23 2004-11-08 21:43 resolv.conf
d--------- 2 root root 4096 2004-11-08 21:43 samba
-rw-r--r-- 1 root root 402 2004-11-08 21:43 interfaces
-rw-r--r-- 1 root root 7739 2004-11-08 21:43 smb.conf
d--------- 4 root root 4096 2004-11-08 21:40 etc
-rw-r--r-- 1 root root 26 2004-11-08 21:40 host.conf
-rw-r--r-- 1 root root 7 2004-11-08 21:40 hostname
-rw-r--r-- 1 root root 240 2004-11-08 21:40 hosts
d--------- 2 root root 4096 2004-11-08 21:40 network
-rw-r--r-- 1 root root 0 2004-11-08 21:40 pump.conf
-rw-r--r-- 1 root root 23 2004-11-08 21:40 resolv.conf
d--------- 2 root root 4096 2004-11-08 21:40 samba
-rw-r--r-- 1 root root 291 2004-11-08 21:40 interfaces
-rw-r--r-- 1 root root 7739 2004-11-08 21:40 smb.conf

Hope this helps.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Thanks for taking the time to help track it down. I'm not able to reproduce the
bug (on current Hoary), though I tried opening network-admin and
enabling/disabling Windows networking a couple of times. Each time, it would
start/stop the service, but it didn't change the rc.d links at all.

Do you remember what operations you performed while network-admin was open, so
that we can find a clue as to how to trigger the problem?

Revision history for this message
Andrew Zajac (arzajac) wrote :

(In reply to comment #22)

I remember network-admin crashing a couple of times. I was playing around with
a prism2_usb device and the wlan0 device did not appear in the network setup
dialog and so I added it myself. I entered all the info (including WEP) used
DHCP and clicked apply, there was a long pause (minutes) after which I tried to
close network-admin myself. I got the dialog saying that it had crashed. I
tried to modify the wireless connection I had made and it crashed some more.

Revision history for this message
Suzan (suzan72) wrote :

> I remember network-admin crashing a couple of times. I was playing around with
> a prism2_usb device and the wlan0 device did not appear in the network setup
> dialog and so I added it myself. I entered all the info (including WEP) used
> DHCP and clicked apply, there was a long pause (minutes) after which I tried to
> close network-admin myself. I got the dialog saying that it had crashed. I
> tried to modify the wireless connection I had made and it crashed some more.

I did exactly the same! I tried to get my ACX111 WLAN-card to working. I played
around with a driver from soundforge and linuxant and i tried several times to
set it up with the network-amin. It crashes a lot of times. And that is the only
thing i did before i have the broken samba-link. It must have something to do
with the network thing.

Revision history for this message
Andrew Zajac (arzajac) wrote :

I have installed Hoary and reproduced the problem.

When I insert my prism2_usb device the modules are loaded but wlan0 is not
configured. The linux-wlan-ng package is not installed by default and it
contains the neccessary tools for configuring such a device - but I digress.

iwconfig, at this point reveals
lo no wireless extensions.

eth0 no wireless extensions.

sit0 no wireless extensions.

wlan0 no wireless extensions.

Now, when I try to configure a new network connection and type in wlan0 by hand,
when I accept the final step the tool pauses and the offending symlinks are
created. The tool then crashed. I am sorry that I did not copy and save the
debugging information offered to me by bug-buddy...

Revision history for this message
Andrew Zajac (arzajac) wrote :

I just did a dist-upgrade to my Warty system to get among other things, the
linux-image package. This bug stops synaptic from configuring packages. This
is where it gets ugly. I no longer had an initrd.img.

Synaptic reports that there were errors and to scroll up to see them. A typical
user would probably distregard the samba symlinks error. Had I not noticed that
my initrd image was missing before turning off my computer it would have been
left in an unbootable state.

I corrected the symlinks manually and did a sudo apt-get -f install and my
initrd image was recreated by the configuration of the linux-image package.

Does this bug need to be increased in severity because of this?

Revision history for this message
Matt Zimmerman (mdz) wrote :

If the system was left in an unbootable state, that is a separate bug, in the
kernel-package. The kernel packages go to some lengths to avoid that situation,
though, so if you file that bug, be sure to provide enough information to
reproduce the problem.

Revision history for this message
Matt Zimmerman (mdz) wrote :

*** Bug 10729 has been marked as a duplicate of this bug. ***

Revision history for this message
Matt Zimmerman (mdz) wrote :

Raising severity; this ought to be fixed for Hoary

Revision history for this message
Carlos Garnacho (carlosg) wrote :

gnome-system-tools 1.1.3's network-admin doesn't config samba anymore (this is
being moved to the shares-admin tool, where it makes much more sense), so I
guess that this is no longer an issue for network-admin (and in the transition
to shares-admin I'll take care to fix this). thanks and sorry

Revision history for this message
Sebastien Bacher (seb128) wrote :

what is the situation of this ? Somebody had this issue with hoary since gst 1.1.3 ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Matt, do you think that's still an issue ?

Revision history for this message
Matt Zimmerman (mdz) wrote :

I don't know; Carlos?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Can anyone confirm that this bug was fixed in the transition to shares-admin?

Revision history for this message
Sivan Greenberg (sivan) wrote :

(In reply to comment #34)
> Can anyone confirm that this bug was fixed in the transition to shares-admin?

I did a couple of checkups on this issue, and couldn't reproduce it either way,
and it seems that shares-admin works pretty fine.

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems to be fixed, I'm closing the bug. Feel free to reopen if you get the issue
again.

Revision history for this message
Brian Madden (untwisted) wrote :

Just an FYI I just got this same error in Dapper this morning after a (failed) dapper update. When I tried to boot I actually got a Kernel panic, so reverted to the old kernel to try to finish the update, and found this error.

Revision history for this message
dan aquila (dan-jules) wrote :

I also recived the same error after a failed update about a week ago. (same day as brian madden)

Some time before that I was trying to setup a share with samba.

I will try to recreate the problem now and I suggust the bug is reopend.

Revision history for this message
Adam Conrad (adconrad) wrote :

Can someone go through the same steps as the debugger of the old bug long ago and see if anything was run via sudo (auth.log should know) around the same time the bad symlinks were created? I can't reproduce this to save my life.

Revision history for this message
Emilian Bold (emilianb) wrote :

I've also noticed this bug on Ubuntu 6.06 on a fresh install (3 days old).

I think samba was already installed since I accessed some samba shares then I went at some point to System - > Administration -> Shared folders and it asked me about installing samba.

After the download, at the end of the install, it returned

"samba: subprocess post-installation script returned error exit status 102".

I've noticed the same broken symlinks and re-created them.

Revision history for this message
vortical (vortical) wrote :

Same exact thing here... I just deleted the symlinks and 're-installed samba' through synaptic and no more error.

rm /etc/rc2.d/K09samba
rm /etc/rc3.d/K09samba

cheers
-vortical

Revision history for this message
JJ (jjbuckley) wrote :

I had an almost idendical problem on 6.06 LTS, but the broken links were

/etc/rc2.d/S91samba -> /samba
/etc/rc3.d/S91samba -> /samba

Obviously, there's no 'samba' in the root folder, so I just deleted these dud links, ran "apt-get upgrade -f" and it seemed to resolve itself.

Maybe one of the recent packages was dodgy.

Revision history for this message
Menachem Shapiro (menachem) wrote :

I just had the same exact issue as <a href=https://launchpad.net/distros/ubuntu/+source/gnome-system-tools/+bug/9208/comments/43>JJ</a>
I was able to resolve it by doing what he recomended.

I am attaching my sudo dpkg --get-selections output, hopefully it will help.

Revision history for this message
Peter Petersson (peter-pmb) wrote :

I also had the same issue as JJ 3 months later. Seems like this one still hits you when you upgrade to Edgy.

Revision history for this message
Carlos Garnacho (carlosg) wrote :

Hi!,

I've added sanity checks in system-tools-backends CVS, so now it will refuse to do *any* changes if it can't figure out the init directories. But, however, after looking a look at the code, I find hard to believe that s-t-b is responsible of this. As the code is right now, if it couldn't detect the relative path between /etc/rc?.d/ and /etc/init.d/ to make the link, it wouldn't neither detect that services are in /etc/init.d nor links in /etc/rc?.d/, so wouldn't get even close to doing a wrong symlink, because it wouldn't even know that samba is there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.