Bug 68740

Summary: Incorrect named share after using samba config tool
Product: [Retired] Red Hat Public Beta Reporter: Need Real Name <leenookx>
Component: redhat-config-sambaAssignee: Brent Fox <bfox>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: limbo   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-16 16:35:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 67217    
Attachments:
Description Flags
Also some problems with some tabs displayed in the tool
none
system generated smb.conf none

Description Need Real Name 2002-07-13 09:55:14 UTC
Description of Problem:
Although the system asks you what you want to call the share, it seems to ignore
this and call it after the path (minus the /'s). for example, I created a share
for the directory '/usr/netzwerk' and just wanted it to be called 'netzwerk',
but when I browsed the network (on a windows 2000 machine) I saw the share was
called 'usrnetzwerk', but the comment against the share was 'netzwerk'.




Version-Release number of selected component (if applicable):


How Reproducible:
Everytime

Steps to Reproduce:
1. run redhat-config-samba
2. create a share
3. 

Actual Results:


Expected Results:
Should be able to perform the things described above.

Additional Information:

Other problems noticed:
The "Advanced Settings" menu option doesn't do anything. No additional windows
pop-up.

Can't configure shares on a per user basis.

Comment 1 Need Real Name 2002-07-13 09:55:57 UTC
Created attachment 65224 [details]
Also some problems with some tabs displayed in the tool

Comment 2 Brent Fox 2002-07-15 21:06:09 UTC
Can you attach the /etc/samba/smb.conf file?

Comment 3 Brent Fox 2002-07-15 21:08:37 UTC
Also, I've done away with the empty notebook tabs.  There were placeholders for
other share options, but I've commented them out for now so they don't show up
anymore.


Comment 4 Need Real Name 2002-07-16 15:41:38 UTC
Created attachment 65546 [details]
system generated smb.conf

Comment 5 Brent Fox 2002-07-16 16:35:53 UTC
Ok.  I remember now why I did it that way.  You cannot have forward slashes in
the section header, or else windows will get confused.  For example, imagine
that my linux box hostname is "fred".  So, if I allowed the file to look like:

[/usr/netzwerk]
	comment = netzwerk
	path = /usr/netzwerk/
	read only = No

then windows would try to access "\\fred\/usr/netzwerk"  Windows can't interpret
the "\/", so you'll get an error dialog from Windows that says:

\\fred\/usr/netzwerk
The network name cannot be found.


Stripping the slashes out of the section header prevents this, but it does make
the section headers ugly.  Maybe there's a better way...

Comment 6 Brent Fox 2002-07-16 19:35:33 UTC
Ok, I've changed the behavior to use the directory name as the section header. 
For example, if you want to share /usr/local now, the file section looks like this:

[local]
        comment = This a comment field
        path = /usr/local

In the event that the user shares a directory with the same directory name bug a
different path, I append a number onto the section header so that Windows won't
get confused.

For example, if you try to share /tmp/foo and /usr/foo, the output will look
like this:

[foo]
        comment = Sharing foo in tmp
        path = /tmp/foo

[foo-1]
        comment = Sharing foo in usr
        path = /usr/foo


This should fix the behavior you are seeing.  Thanks for your report.