Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 88495 - Samba init scripts have difficulty killing two NMBD processes
Summary: Samba init scripts have difficulty killing two NMBD processes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: samba
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-10 15:22 UTC by Josiah Royse
Modified: 2014-08-31 23:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-11-21 01:57:34 UTC


Attachments (Terms of Use)
smb.conf (deleted)
2003-04-10 15:23 UTC, Josiah Royse
no flags Details

Description Josiah Royse 2003-04-10 15:22:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Using a smb.conf file that has the wins support = yes, causes two nmbd processes
to start, and the "/sbin/service smb stop"  init scripts don't deal well two
nmbd's, you have to run "stop" twice to catch both.

Attached is a smb.conf that re-creates the error, but I believe it just needs
the wins flag = yes.  the smb.conf file attached passed the "testparm" command also.

Version-Release number of selected component (if applicable):
samba-2.2.7a-8.9.0

How reproducible:
Always

Steps to Reproduce:
1. use attached smb.conf
2. start smb process
3. stop smb process
4. check smb status
    

Actual Results:  all started.. then not all stopped

Expected Results:  all started.. all stopped

Additional info:

[root@tabasco samba]# rm /var/run/samba/*
rm: remove regular file `/var/run/samba/nmbd.pid'? y
rm: remove regular file `/var/run/samba/smbd.pid'? y
[root@tabasco samba]# /sbin/service smb status
smbd is stopped
nmbd is stopped
[root@tabasco samba]# /sbin/service smb start
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]
[root@tabasco samba]# /sbin/service smb status
smbd (pid 7662) is running...
nmbd (pid 7667 7666) is running...
[root@tabasco samba]# /sbin/service smb stop
Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
[root@tabasco samba]# /sbin/service smb status
smbd is stopped
nmbd (pid 7693 7666) is running...
[root@tabasco samba]# /sbin/service smb stop
Shutting down SMB services:                                [FAILED]
Shutting down NMB services: /etc/init.d/smb: line 195: kill: (7666) - No such
process
                                                           [  OK  ]
[root@tabasco samba]# /sbin/service smb status
smbd is stopped
nmbd is stopped

Comment 1 Josiah Royse 2003-04-10 15:23:42 UTC
Created attachment 91058 [details]
smb.conf

smb.conf with multiple shares, wins =yes

Comment 2 Jay Fenlason 2003-04-24 22:18:49 UTC
Try adding
pid directory = /var/run
to your /etc/samba/smb.conf file.  It seems to make "service smb stop" work
correctly here.  I'll try to make sure this makes it into the next erratum.

Comment 3 Josiah Royse 2003-04-26 02:19:08 UTC
Great that works!  It seems that the function "killproc" in the init functions
couldn't get to the directory /var/run/samba.

I've also found these areas to change:

samba.spec: compiled in    --with-piddir=/var/run/samba \
samba.spec: directory /var/run/samba created
/etc/init.d/smb: listed in the header comments.

Comment 4 Josiah Royse 2003-11-21 01:57:34 UTC
Really, this is fixed, but the bug exists in RedHat 9.0, which is EOL
soon..?

samba-3.0.0-15 spec file:

...snip...

* Thu Apr 24 2003 Jay Fenlason <fenlason@redhat.com> 2.2.8a-1
- upgrade to 2.2.8a
- remove old .md5 files
- add "pid directory = /var/run" to the smb.conf file.  Fixes #88495
- Patch from jra@dp.samba.org to fix a delete-on-close regression



Note You need to log in before you can comment on or make changes to this bug.