Opened 19 years ago

Closed 19 years ago

Last modified 16 years ago

#1386 closed defect (fixed)

Inappropriate defaults in smb.conf

Reported by: alexander@… Owned by: Randy McMurchy
Priority: high Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords: VERIFIED
Cc:

Description

Currently SAMBA instructions tell the reader to do this: install -v -m644 ../examples/smb.conf.default /etc/samba However, with this file, SAMBA will assume that filenames are encoded in UTF-8 on disk, and the parameter to change that ("unix charset") is not even mentioned in the example configuration file. Defaulting to non-working configuration without saying so is a bug. Also, this example file seems to be overloaded with settings. What about this minimal client-only example configuration? Tell the readers that they have to set the following parameters as a bare minimum: [global]

workgroup = WORKGROUP dos charset = cp850 unix charset = ISO-8859-1

(of course tell readers to set the values that are right for them) BTW "dos charset" and "unix charset" are treated as "advanced" parameters by SWAT--that's IMHO an upstream bug because _every_ non-English user has to set them.

Change History (14)

comment:1 by Randy McMurchy, 19 years ago

Milestone: future6.1
rep_platform: OtherAll

comment:2 by Randy McMurchy, 19 years ago

Status: newassigned

comment:3 by Randy McMurchy, 19 years ago

Owner: changed from blfs-book@… to Randy McMurchy
Status: assignednew

comment:4 by Randy McMurchy, 19 years ago

Status: newassigned

comment:5 by Randy McMurchy, 19 years ago

Resolution: fixed
Status: assignedclosed

Updated Samba configuration section

I kept the "overloaded" file used as the default, but updated the text in the book to include the minimum parameters which should be set. I's my belief that suggesting a new "bare minimum" configuration file makes it too difficult for users to examine the available values and make changes appropriate for their installation.

The way the book is now (after these changes) still uses the "overloaded" file (with the majority of available parameter settings commented out), but includes the suggestions provided by Alexander.

comment:6 by alexander@…, 19 years ago

Resolution: fixed
Status: closedreopened

Reopening due to incorrect wording in the book. + <title>Configuration Information</title> + + <para>The installation commands installed a default configuration file + which you can use as an example to set the values for your system and + network. At a minimum, ensure you set the following value to an + appropriate setting for your network in the + <filename>/etc/samba/smb.conf</filename> configuration file:</para> + +<screen><literal>workgroup = <replaceable>WORKGROUP</replaceable></literal></screen> Please say that this parameter is in the "[global]" section. + + <para>Also, for non-English locales, ensure the following values are + set properly in the [global] section:</para> Wrong, this is needed for en_US too, because it is en_US.ISO-8859-1, not en_US.UTF-8. +<screen><literal>dos charset = <replaceable>cp850</replaceable> +unix charset = <replaceable>ISO-8859-1</replaceable></literal></screen> You rely solely on typographical conventions to mark the fact that the values have to be replaced. I suggest adding some words. + + </sect3> + + <sect3> As for copying the default file to smb.conf, this goes against the upstream recommendation to keep the smb.conf file under 20 lines (as a rule of thumb that you understand what you are doing).

comment:7 by Randy McMurchy, 19 years ago

Resolution: fixed
Status: reopenedclosed

Trying to address Alex's points.

"Say that the 'workgroup = ' parameter is in the [global] section."

It already is in the [global] section, so uncommenting the line and adding the correct definition to the parameter is sufficient.

"Needs to be for US locales also"

Why? It works just fine for me, in my US locale. Please point out the deficiency with the default setup. I cannot reproduce any bug.

"Typographical conventions aren't good enough"

Yes, Alex, they are. It is the way it is done throughout the book, additionally, the text says that the parameters must be changed to fit the needs of the installer.

"Not adhering to upstream recommendations"

Please point out a URL that says the smb.conf.default file should not be used as a basis for the configuration file.

comment:8 by alexander@…, 19 years ago

Resolution: fixed
Status: closedreopened

Addressing the technical question first.

"Needs to be for US locales also"

Yes. Testcase: try creating an empty file named "éditeur.txt" in Windows 2000 Professional (note the accented character) and sharing it. "éditeur.txt" is a valid ISO-8859-1 string, and thus a valid filename in Linux in en_US.ISO-8859-1 locale. Now try downloading it using smbclient when there is no "unix charset" in smb.conf. You will end up with a file named éditeur.txt, which is certainly wrong. Now try with "unix charset = ISO-8859-1" and see the difference.

comment:9 by alexander@…, 19 years ago

Now for non-technical questions:

"Typographical conventions aren't good enough"

They alone don't suffice. Yes, there is a piece of text that reads:

ensure the following values are set properly in the [global] section

and then follows the example valid for en_US. This text may be mis-interpreted as "the folloving example settings are proper for every installation". Please reword it.

"Not adhering to upstream recommendations"

sorry for that. Probably two projects with big config files mixed in my head.

"Say that the 'workgroup = ' parameter is in the [global] section."

OK, this is indeed stated in smb.conf.default and in the tutorials that the book references.

comment:10 by bdubbs@…, 19 years ago

Resolution: fixed
Status: reopenedclosed

Marking fixed. Please move the discussion to blfs-dev.

comment:11 by Randy McMurchy, 19 years ago

Resolution: fixed
Status: closedreopened

Alex has provided wonderful text to add to the book. I have also done some testing that proves the 'unix charset' parameter is required in the smb.conf file (at least for en_US locales).

Reopening this bug, however, I'm going to wait until Alex respondes to my most recent reply and to Jürg's reply before updating BLFS.

Thanks again, Alex for taking the time to clarify everything and for writing the text.

comment:12 by Randy McMurchy, 19 years ago

Resolution: fixed
Status: reopenedclosed

Once again, the Samba server instructions have been updated. This time including Alex's comments. Hopefully, it puts this bug to bed.

comment:13 by alexander@…, 19 years ago

Keywords: VERIFIED added

Marking as verified, since the SAMBA page with correstions is online.

comment:14 by (none), 16 years ago

Milestone: 6.1

Milestone 6.1 deleted

Note: See TracTickets for help on using tickets.