Bug 251477 - Shared directory not visible after every reboot
Shared directory not visible after every reboot
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: system-config-samba (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
:
: 249830 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-09 06:52 EDT by Paul Smith
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2.47-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-15 15:47:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Smith 2007-08-09 06:52:58 EDT
Samba works fine here, but, after every reboot, I have to go 

system-config-samba

to set the shared directory visible, i.e., this setting is lost after every reboot.

Paul
Comment 1 Nils Philippsen 2007-08-09 08:09:55 EDT
I need some additional information:

- Which version of samba and system-config-samba do you have?
- Which share are you talking about? Name is sufficient as you should upload
your smb.conf later on anyway.

Please do the following:

1. Boot your system
2. run "ls -l /etc/samba/smb.conf" and post the output to this bug report
3. attach /etc/samba/smb.conf to this bug report
4. run system-config-samba to set the share visible
5. repeat steps 2 and 3
6. Reboot your system
7. repeat steps 2 and 3

Thanks.
Comment 2 Paul Smith 2007-08-09 08:34:53 EDT
Thanks, Nils.

> - Which version of samba and system-config-samba do you have?

system-config-samba-1.2.44-1.fc7

> - Which share are you talking about? Name is sufficient as you should upload
> your smb.conf later on anyway.

/home/paulus/intercambio

> Please do the following:
> 
> 1. Boot your system
> 2. run "ls -l /etc/samba/smb.conf" and post the output to this bug report

$ ls -l /etc/samba/smb.conf
-rw-r--r-- 1 root root 1755 2007-08-07 20:08 /etc/samba/smb.conf
$ 

> 3. attach /etc/samba/smb.conf to this bug report

[global]
        dns proxy = no
        log file = /var/log/samba/%m.log
        cups options = raw
        load printers = no
        server string = Samba Server
        workgroup = mygroup
        max log size = 50
        security = share

[intercambio]
        path = /home/paulus/intercambio
        writeable = yes
        valid users = paulus
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes


> 4. run system-config-samba to set the share visible
> 5. repeat steps 2 and 3

$ ls -l /etc/samba/smb.conf
-rw-r--r-- 1 root root 1774 2007-08-09 13:22 /etc/samba/smb.conf
$ 
[global]
        dns proxy = no
        log file = /var/log/samba/%m.log
        cups options = raw
        load printers = no
        server string = Samba Server
        workgroup = mygroup
        max log size = 50
        security = share

[intercambio]
        path = /home/paulus/intercambio
        writeable = yes
        valid users = paulus
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes

> 6. Reboot your system
> 7. repeat steps 2 and 3

$ ls -l /etc/samba/smb.conf
-rw-r--r-- 1 root root 1774 2007-08-09 13:22 /etc/samba/smb.conf
$


[global]
        dns proxy = no
        log file = /var/log/samba/%m.log
        cups options = raw
        load printers = no
        server string = Samba Server
        workgroup = mygroup
        max log size = 50
        security = share

[intercambio]
        path = /home/paulus/intercambio
        writeable = yes
        valid users = paulus
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes
;       browseable = yes

I have just checked system-config-samba and I can see that the shared directory
is not set visible.

Paul
Comment 3 Nils Philippsen 2007-08-09 10:33:59 EDT
Next time please attach the files using the "Create New Attachment" link below
instead of pasting them as a comment, thanks ;-).

I've found that samba really makes the share visible but the share window
ignored default values and fixed this in the upstream repository. Unfortunately,
the commented out default value lines tend to get added every time a share is
edited -- this needs some hard thinking on my behalf how to treat these as
not-quite-comments so you don't end up with multiple of these lines.
Comment 4 Paul Smith 2007-08-09 10:41:24 EDT
> Next time please attach the files using the "Create New Attachment" link below
> instead of pasting them as a comment, thanks ;-).

I am sorry about that. I will do so next time.

> I've found that samba really makes the share visible but the share window
> ignored default values and fixed this in the upstream repository. Unfortunately,
> the commented out default value lines tend to get added every time a share is
> edited -- this needs some hard thinking on my behalf how to treat these as
> not-quite-comments so you don't end up with multiple of these lines.

Thanks for your effort, Nils.

Paul
Comment 5 Nils Philippsen 2007-08-09 12:09:15 EDT
I'm just building system-config-samba-1.2.46-1.fc7 for updates-testing which
contains heuristics to not duplicate these comment lines (and clean them up when
editing a share entry). Please test it once it's available, especially back up
your smb.conf and run "diff -ubw <yourbackupfile> /etc/samba/smb.conf" and look
for anything important missing (it's meant to delete the n-plicate browseable
comment lines) or represented wrongly. Thanks.
Comment 6 Paul Smith 2007-08-09 12:24:15 EDT
I will do it for you, as soon as I get the package on updates-testing.
Comment 7 Fedora Update System 2007-08-10 18:20:53 EDT
system-config-samba-1.2.46-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Paul Smith 2007-08-10 19:19:22 EDT
Thanks, Nils.

Apparently, the visibility of the shared directory is preserved after reboots,
but the elimination of the lines

;       browseable = yes

is done only when one makes the shared directory visible (only one of those
lines is not deleted), but not when one makes it hidden. Should not your
heuristics act in both ways?

Paul

Comment 9 Paul Smith 2007-08-10 19:36:53 EDT
It is not working properly. In fact, after a reboot, the shared directory is
shown as visible in system-config-samba but when I try to access it, I cannot.
The workaround is to go again to system-config-samba to set visible off and
again on.

Paul


Comment 10 Nils Philippsen 2007-08-13 04:46:15 EDT
(In reply to comment #8)
> Apparently, the visibility of the shared directory is preserved after reboots,
> but the elimination of the lines
> 
> ;       browseable = yes
> 
> is done only when one makes the shared directory visible (only one of those
> lines is not deleted), but not when one makes it hidden. Should not your
> heuristics act in both ways?

The config file parser/writer only changes a section when it's touched, i.e.
when the user changes something. This is intentional.

(In reply to comment #9)
> It is not working properly. In fact, after a reboot, the shared directory is
> shown as visible in system-config-samba but when I try to access it, I cannot.
> The workaround is to go again to system-config-samba to set visible off and
> again on.

I can't see how the samba configuration file is affected by rebooting, is it
possible that samba doesn't start automatically on your system? What does the
command "chkconfig --list smb; chkconfig --list nmb" give? Or "service smb
status; service nmb status"?
Comment 11 Paul Smith 2007-08-13 08:03:48 EDT
(In reply to comment #10)
> > Apparently, the visibility of the shared directory is preserved after reboots,
> > but the elimination of the lines
> > 
> > ;       browseable = yes
> > 
> > is done only when one makes the shared directory visible (only one of those
> > lines is not deleted), but not when one makes it hidden. Should not your
> > heuristics act in both ways?
> 
> The config file parser/writer only changes a section when it's touched, i.e.
> when the user changes something. This is intentional.

Yes, I understand that. However, one touches the config file when changing from
visible to invisible. Apparently, your heuristics do not act when changing from
visible to invisible; they only act when changing from invisible to visible.
 
> (In reply to comment #9)
> > It is not working properly. In fact, after a reboot, the shared directory is
> > shown as visible in system-config-samba but when I try to access it, I cannot.
> > The workaround is to go again to system-config-samba to set visible off and
> > again on.
> 
> I can't see how the samba configuration file is affected by rebooting, is it
> possible that samba doesn't start automatically on your system? What does the
> command "chkconfig --list smb; chkconfig --list nmb" give? Or "service smb
> status; service nmb status"?

# /sbin/chkconfig --list smb; /sbin/chkconfig --list nmb
smb             0:off   1:off   2:off   3:off   4:off   5:on    6:off
nmb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
#
# /sbin/service smb status; /sbin/service nmb status
smbd (pid 2609 2582) is running...
nmbd is stopped
#

Paul
Comment 12 Nils Philippsen 2007-08-13 16:13:39 EDT
(In reply to comment #11)
> Apparently, your heuristics do not act when changing from
> visible to invisible; they only act when changing from invisible to visible.

I've built system-config-samba-1.2.47 which should fix that problem, this should
hit updates-testing shortly.

> > (In reply to comment #9)
> > > It is not working properly. In fact, after a reboot, the shared directory is
> > > shown as visible in system-config-samba but when I try to access it, I cannot.
> > > The workaround is to go again to system-config-samba to set visible off and
> > > again on.
> > 
> > I can't see how the samba configuration file is affected by rebooting, is it
> > possible that samba doesn't start automatically on your system? What does the
> > command "chkconfig --list smb; chkconfig --list nmb" give? Or "service smb
> > status; service nmb status"?
> 
> # /sbin/chkconfig --list smb; /sbin/chkconfig --list nmb
> smb             0:off   1:off   2:off   3:off   4:off   5:on    6:off
> nmb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
> #
> # /sbin/service smb status; /sbin/service nmb status
> smbd (pid 2609 2582) is running...
> nmbd is stopped
> #

This may be the problem, the "nmb" service must be running as well --
system-config-samba starts it if needed. Please run the following commands to
fix that:

service nmb start
chkconfig nmb on
Comment 13 Paul Smith 2007-08-13 16:56:00 EDT
> I've built system-config-samba-1.2.47 which should fix that problem, this should
> hit updates-testing shortly.

I will test it as soon as I get it.
 
> This may be the problem, the "nmb" service must be running as well --
> system-config-samba starts it if needed. Please run the following commands to
> fix that:
> 
> service nmb start
> chkconfig nmb on

Yes, that fixes the problem. If I stop nmb and then go to the shared directory
from a virtual machine, I cannot access to it. Should I configure my computer to
start nmb at the startup? 

Paul
Comment 14 Fedora Update System 2007-08-13 18:51:24 EDT
system-config-samba-1.2.47-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Paul Smith 2007-08-13 20:19:38 EDT
(In reply to comment #14)
> system-config-samba-1.2.47-1.fc7 has been pushed to the Fedora 7 testing
repository.  If problems still persist, please make note of it in this bug report.

When I turn hidden the shared directory, from the virtual machine I still can
get access to the directory. I do not know whether this is supposed to happen.

Regarding everything else, I think system-config-samba is working fine.

Paul

Comment 16 Nils Philippsen 2007-08-14 03:06:30 EDT
(In reply to comment #13) 
> > This may be the problem, the "nmb" service must be running as well --
> > system-config-samba starts it if needed. Please run the following commands to
> > fix that:
> > 
> > service nmb start
> > chkconfig nmb on
> 
> Yes, that fixes the problem. If I stop nmb and then go to the shared directory
> from a virtual machine, I cannot access to it. Should I configure my computer
> to start nmb at the startup? 

Yes, you need to do that for Samba working properly. I guess you could configure
one machine in your network as a WINS server instead (which still would need to
run nmbd or the Windows equivalent), but I guess that's a bit overkill for a
normal setup.

(In reply to comment #15)
> When I turn hidden the shared directory, from the virtual machine I still can
> get access to the directory. I do not know whether this is supposed to happen.

That's okay -- if it's hidden, the share's name isn't advertised, but it can be
accessed if you know the name.

> Regarding everything else, I think system-config-samba is working fine.

Good to hear :-).
Comment 17 Paul Smith 2007-08-14 12:52:25 EDT
(In reply to comment #16)
> > Regarding everything else, I think system-config-samba is working fine.
> 
> Good to hear :-).

Thanks a lot, Nils, for having repaired system-config-samba so well.

Paul


Comment 18 Fedora Update System 2007-08-15 15:47:03 EDT
system-config-samba-1.2.47-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 19 Nils Philippsen 2007-08-28 03:46:39 EDT
*** Bug 249830 has been marked as a duplicate of this bug. ***

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