Weblog entry #5 for e5z8652

winbind, could not receive trustdoms, and avahi
Posted by e5z8652 on Tue 24 Jun 2008 at 05:57
Tags: none.
Recently had an issue where Samba was malfunctioning, specifically winbind. wbinfo -u and wbinfo -g failed, and log.winbindd had "Could not receive trustdoms" errors when winbindd was started.
<cut>

Turns out that the avahi-daemon package had edited nsswitch.conf to make it look like this:

---------------------------------
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: files winbind
group: files winbind
shadow: files

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 wins
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
---------------------------------

The key element here being the hosts line. It is set up to first check /etc/hosts, then try avahi, then try dns, then try avahi again, and finally try wins resolution.

Samba chokes on the mdns/avahi stuff and fails to load.

The solution is to edit the hosts line to read:

hosts: files dns wins

and then nuke avahi. I really, really, really, really hate this avahi-daemon package, as in my experience it behaves badly.

The only problem is that I keep doing an `apt-get --purge remove avahi-daemon` and the very next time that I do a dist-upgrade it's back!!! I need to learn more about finding dependencies, and nuke whatever package is listing avahi-daemon as a dependency. (No packages are listed when I purge avahi-daemon though.)

 

Comments on this Entry

Posted by Anonymous (70.105.xx.xx) on Thu 26 Jun 2008 at 01:38
Yes, I similarly agree.
On my Etch system I do not run any daemons if I can help it.
Through my casual reading of Debian's documentation I have found very little need
or desire for Avahi or D-bus, etc.
Because of these dependencies I avoid most all of Gnome or KDE.
My next project is to eliminate HPLIP and CUPS.
I'm lazy so they are currently running.

Maybe if some document or blog would show 'a' or more reason why these daemons are
needed or useful I may reconsider.

Many good programs like VLC are off my list because of "dependency creep",
which usually keeps adding "weird" background chatting daemons.

This makes me reconsider going back to Slackware where I usually made from source.

I always thought the motto was many small and combineable tools.
Not many small and required combinations of tools.

My Etch box without these pesky things so far does not crash, at least not for me.

Sarge used to crash inthe beginning, then got better.

[ Parent | Reply to this comment ]

Posted by Anonymous (200.232.xx.xx) on Sat 5 Jul 2008 at 20:28
Probably it's a package that is recommending avahi.
Try this:

aptitude --without-recommends dist-upgrade

[ Parent | Reply to this comment ]

Posted by e5z8652 (206.174.xx.xx) on Sun 6 Jul 2008 at 00:22
[ Send Message | View Weblogs ]
I ended up settling for turning avahi off in /etc/default

I think avahi-daemon is becoming more optional. I can purge avahi in Lenny without too much pain, but in Etch purging avahi wants to also purge KDE.

[ Parent | Reply to this comment ]