Bug 251477 - Shared directory not visible after every reboot
Summary: Shared directory not visible after every reboot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-samba
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 249830 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-09 10:52 UTC by Paul Smith
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version: 1.2.47-1.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-15 19:47:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Paul Smith 2007-08-09 10:52:58 UTC
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 12:09:55 UTC
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 12:34:53 UTC
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 14:33:59 UTC
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 14:41:24 UTC
> 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 16:09:15 UTC
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 16:24:15 UTC
I will do it for you, as soon as I get the package on updates-testing.

Comment 7 Fedora Update System 2007-08-10 22:20:53 UTC
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 23:19:22 UTC
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 23:36:53 UTC
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 08:46:15 UTC
(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 12:03:48 UTC
(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 20:13:39 UTC
(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 20:56:00 UTC
> 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 22:51:24 UTC
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-14 00:19:38 UTC
(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 07:06:30 UTC
(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 16:52:25 UTC
(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 19:47:03 UTC
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 07:46:39 UTC
*** 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.