GNOME Bugzilla – Bug 325495
shares-admin creates multiple repeat entries in smb.conf
Last modified: 2006-09-08 19:04:35 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$]
Still happening with 2.15.4, it happens when the folder name contains a "$" apparently
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.