After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325495 - shares-admin creates multiple repeat entries in smb.conf
shares-admin creates multiple repeat entries in smb.conf
Status: RESOLVED FIXED
Product: gnome-system-tools
Classification: Deprecated
Component: shares-admin
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
Carlos Garnacho
Depends on:
Blocks:
 
 
Reported: 2006-01-02 10:55 UTC by Daniel Holbach
Modified: 2006-09-08 19:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Daniel Holbach 2006-01-02 10:55:41 UTC
Forwarded from: https://launchpad.net/distros/ubuntu/+source/gnome-system-tools/+bug/6142

Using Ubuntu Breezy, although this problem was also observed under Hoary. Using gnome-system-tools 1.4.0-0ubuntu10

When using the graphical tool for administering Samba shares (/usr/bin/shares-admin in the g-s-t package), a whole series of blank entries corresponding to one entry is made.

Steps to repeat:
1. "sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.OLD", to ensure that we're starting from scratch (see * below)
2. Start up shares-admin, either from the command line or via System > Administration > Shared Folders
3. Add a new Samba share. I added a hidden name "folder$" and a comment and ticked the browseable and read-only buttons.
4. Close shares-admin.
5. Inspect /etc/samba/smb.conf, which will now have multiple entries for share "folder$". (see # below)
6. If you restart shares-admin, you will see multiple (I get 9) blank entries. Not very helpful.

(*) Yes, you're not supposed to just delete package files. I guess this also work if you have a fresh install of samba-common, i.e. "sudo apt-get --purge remove samba-common && sudo rm /etc/samba/smb.conf; sudo apt-get install samba-common" or something like that. I'm not sure of the dependencies in samba and this command has not been tested.

(#) After the shares-admin, my smb.conf reads:

[global]
wins support = no

[folder$]
path = /home/rewley/folder

[folder$]
comment = a folder

[folder$]
available = yes

[folder$]
browseable = yes

[folder$]
public = yes

[folder$]
writable = no

[folder$]

[folder$]

[folder$]
Comment 1 Sebastien Bacher 2006-09-08 15:33:26 UTC
Still happening with 2.15.4, it happens when the folder name contains a "$" apparently
Comment 2 Carlos Garnacho 2006-09-08 19:04:35 UTC
Fixed in s-t-b HEAD:

2006-09-08  Carlos Garnacho  <carlosg@gnome.org>

        * Utils/Parse.pm (get_from_ini)
        * Utils/Replace.pm (set_init) (remove_ini_section): escape properly
        the section name so it doesn't barf in regexps. Fixes GNOME bug
        #325495.