[SRU] nmbd doesn't start because of missing testparm

Bug #572410 reported by Nick Wellnhofer
66
This bug affects 13 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Undecided
Chuck Short

Bug Description

Binary package hint: samba

After upgrading to Lucid nmdb failed to start. It turned out that the upstart script for nmbd needs testparm and I didn't have samba-common-bin installed. samba only recommends samba-common-bin via samba-common but doesn't depend on it. This should be fixed.

Revision history for this message
Chuck Short (zulcss) wrote :

Thanks this will probably be a good sru candidate.

chuck

Changed in samba (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Thierry Carrez (ttx)
summary: - nmbd doesn't start
+ nmbd doesn't start because of missing testparm
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: nmbd doesn't start because of missing testparm

This bug was fixed in the package samba - 2:3.5.3~dfsg-0ubuntu4

---------------
samba (2:3.5.3~dfsg-0ubuntu4) maverick; urgency=low

  * debian/control: Add dependency of samba-common-bin to samba. (LP: #572410)
 -- Chuck Short <email address hidden> Fri, 11 Jun 2010 08:44:13 -0400

Changed in samba (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Etienne (richelle) wrote :

The bug affects Kamic, which is LTS.
I think it would be a good idea to fix this for karmic too, wouldn't it ?
Karmic has still the 2.3.4.7 version.

Chuck Short (zulcss)
summary: - nmbd doesn't start because of missing testparm
+ [SRU] nmbd doesn't start because of missing testparm
Revision history for this message
Chuck Short (zulcss) wrote :

Statement of Impact:

When users are installing samba, samba-common-bin might not be installed so the nmbd upstart job may not run because testparm is missing.

Explanation of Fix: I have added samba-common-bin to debian/control. This has been addressed in maverick and has been backported to lucid. I have attached the debdiff to this bug.

Impact/Regressions: I dont think there will be any regressions from this change.

How to reproduce:

1. Install samba
2. Check to see if samba-common-bin
3. Try to start nmbd.

If you have any questions please let me know.

Regards
chuck

Revision history for this message
John Dong (jdong) wrote :

Patch looks good. ACK from SRU team.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted samba into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in samba (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Any testers?

Thierry Carrez (ttx)
Changed in samba (Ubuntu Lucid):
assignee: nobody → Chuck Short (zulcss)
Revision history for this message
Martin Pitt (pitti) wrote :

Can anyone please test this?

Revision history for this message
Thierry Carrez (ttx) wrote :

Bug 596064 also affects this area, I'd very much like to include the fix for this one as well...

Revision history for this message
Steve Langasek (vorlon) wrote :

Confirmed:

- installed samba from lucid, then removed the recommended samba-common-bin.
- rebooted; nmbd did not start up.
- ran 'sudo start nmbd', job fails to start.
- installed samba from lucid-proposed; this pulled in samba-common-bin automatically, and nmbd is now running.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.4.7~dfsg-1ubuntu3.1

---------------
samba (2:3.4.7~dfsg-1ubuntu3.1) lucid-proposed; urgency=low

  * debian/control: Add samba-common-bin to samba. (LP: #572410)
 -- Chuck Short <email address hidden> Fri, 16 Jul 2010 13:25:12 -0400

Changed in samba (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
jorsmal (jorsmal) wrote :

i'm running samba (2:3.4.7~dfsg-lubuntu3.1) and the problem remains. i'm a newbie, but the only way i get samba to run with no problem is when manually started with gadmin-samba. in fact... to run samba i change the name of the file /etc/init/smbd.conf to prevent upstart to work. i would like to understand how can this be a low priority bug. if ubuntu is not supposed to be able to be able to share folders, it should be mentioned in the begin. there isn't a single package that i've not updated, and samba doesn't work when booted with upstart.

Revision history for this message
jorsmal (jorsmal) wrote :

after 2 hours of experiences, i have to say that the problem really isn't samba - 2:3.4.7~dfsg-1ubuntu3.1, or even samba-common-bin. those really are working. the problem is that clients (either another linux or win) can't log in until upstart finishes up nmbd and smbd. and the problem is not with the capabilites of the hardware. it's more than enough 4 what it is supposed to do. it's a bad start 4 upstart.

now it's explained why personal file sharing is requesting apache to run. smbd didn't have this kind of problems with sysv, and it seems that ubuntu is going the win way, adopting buggy revolutionary technology.

it took me over 4 hours to be able to make a share in ubuntu 10.04 lts and be able to see it in both win and lin clients. such task is supposed to take 5 minutes.

Revision history for this message
Dmitry Frolov (frol) wrote :

Experienced the same problem with missing testparm on Maverick with samba-common-bin 2:3.5.4~dfsg-1ubuntu8. Quickly fixed it with:

sudo dpkg-reconfigure samba-common-bin

which reinstalled alternative links for testparm and family.

Revision history for this message
Pablo Piaggio (papibe) wrote :

I can confirm that this problem is still happening.

If you change from dhcp to an static IP, nmbd won't start anymore. The problem did NOT solve after restarting samba. I checked the common packages, and both were installed already (samba-common and samba-common-bin).
This is what finally solved my problem (thanks frol!):

    $ sudo dpkg-reconfigure samba-common-bin

Regards.

I'm running the 32bit server version.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

$ uname -a
Linux parra 2.6.32-24-generic-pae #43-Ubuntu SMP Thu Sep 16 15:30:27 UTC 2010 i686 GNU/Linux

$ smbd --version
Version 3.4.7

Revision history for this message
Kornel Nagy (snowmanx11) wrote :

It is also exists for me. I am going to test the reconfig command.

Revision history for this message
Nathanel Titane (nathanel.titane) wrote :

im having the same issue on ubutnu maverick amd64

testparm returns no error on config and the nmbd daemon refuses to start.. i cannot view shares through nautilus on any of my machines..

I've reconfigured samba, smaba-common and samba-common-bin with no result

Here's all my term output for analysis on a reverted default config (which should at least show printers folder):

nathanel@Mercury:~$ lsb_release -a && uname -a && smbd --version && nmbd --version
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick
Linux Mercury 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC 2010 x86_64 GNU/Linux
Version 3.5.4
Version 3.5.4

nathanel@Mercury:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Can't find include file /etc/samba/dhcp.conf
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
ERROR: state directory /var/lib/samba does not exist
ERROR: cache directory /var/cache/samba does not exist
Server role: ROLE_STANDALONE
[global]
 server string = %h server (Samba, Ubuntu)
 encrypt passwords = No
 map to guest = Bad User
 obey pam restrictions = Yes
 pam password change = Yes
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 unix password sync = Yes
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 1000
 dns proxy = No
 usershare allow guests = Yes
 panic action = /usr/share/samba/panic-action %d

[printers]
 comment = All Printers
 path = /var/spool/samba
 create mask = 0700
 printable = Yes
 browseable = No

[print$]
 comment = Printer Drivers
 path = /var/lib/samba/printers

Revision history for this message
Nathanel Titane (nathanel.titane) wrote :

P.S.: my normal config is as follows:

[global]
# Browsing/Identification #
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
# Debugging/Accounting #
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
# Authentication #
encrypt passwords = true
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
# Misc #
usershare allow guests = yes
usershare owner only = False
# Share Definitions #
[$ON_USER]
path = /home/$ON_USER
writeable = yes
guest ok = yes
[Dropbox]
path = /home/$ON_USER/Dropbox
writeable = yes
guest ok = yes
[Disk]
path = /media/Disk
writeable = yes
guest ok = yes
[Backup Disk]
path = /media/Backup Disk
writeable = yes
guest ok = yes

Revision history for this message
Wolfram Fischer (wolfram-fischer-zim) wrote :

On maverick with static IP addressing the following helped:

Exchange "testparm" to "testparm.samba3" in /etc/init/nmbd.conf.

NMBD_DISABLED=`testparm.samba3 -s --parameter-name='disable netbios' 2>/dev/null`

Revision history for this message
puppet (puppet-trash) wrote :

Thanks to bkrzem that posted a solution on a duplicate of this bug (#582376)

Well, actually I've been struggling with this issue for a week! But in my case the problem seems to be that nmbd is called to be started up BEFORE the net device is actually on... so the solution in my case was to change

   start on (local-filesystems and net-device-up IFACE!=lo)

to

   start on (local-filesystems)

in /etc/init/nmbd.conf

Revision history for this message
puppet (puppet-trash) wrote :

ah... and this bug IS NOT a duplicate of bug #582376 (IMHO of course...) as testparm was installed and perfectly working.

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

Duplicates of this bug

Other bug subscribers

Patches

Remote bug watches

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