Bug 276441

Summary: Localized workgroup parameter
Product: [openSUSE] openSUSE 10.3 Reporter: Lars Müller <lmuelle>
Component: YaST2Assignee: Lars Müller <lmuelle>
Status: RESOLVED FEATURE QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: jsuchome, ke, locilka, ralf, samba-maintainers
Version: Alpha 4   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 10.3   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Lars Müller 2007-05-19 12:01:23 UTC
With Novell Samba packages 3.0.25 revision 1307 and later the global workgroup parameter will be set to WORKGROUP  This is the same default as Microsoft uses.

But Microsoft uses localized defaults.  In german language it's for example ARBEITSGRUPPE.

Therefore YaST samba-server and samba-client should change the value for workgroup depending on the locale the user set for the system.

YaST should modify the workgroup setting only if:

a) no file exits inside /var/log/samba/.  In this case the user might have
   already used any Samba daemons before.
and
b) smb.conf is unmodified from the RPM point of view.

IIRC different YaST modules are able to share common functions.

To create the required translation table it's possible to check Microsoft's knowledge base in the different languages or create Novell internal a request to people familiar with localized Microsoft versions.

Jiri and Lukas: Please decide yourself whom of you will implement this feature.  If this is to late for the 10.3. release feel free to move it to the next release.
Comment 1 Jiří Suchomel 2007-05-28 06:59:38 UTC
Sorry but I do not understand what behavior of YaST modules do you require. What should be translated? YaST modules are already translated, do you mean some keys in smb.conf? Or parameter to some call?
Comment 2 Lars Müller 2007-05-28 11:58:59 UTC
The _value_ used for the global parameter 'workgroup' should be able to get a localized version under the conditions described in the initial comment.
Comment 3 Jiří Suchomel 2007-05-28 12:02:14 UTC
Sorry, but I still don't understand. Do you mean that user should be able to enter localized version of workgroup? Or that YaST should show it somehow - but from where does it get the correct value?
Comment 4 Lars Müller 2007-05-28 12:13:37 UTC
YaST should use a localized default value derivated from the locale the user decided while the system install.  

A translation table is required to provide the localized strings.

Currently the table is:

language        translation of WORKGROUP
German          ARBEITSGRUPPE
*               WORKGROUP

While * is the default fallback if there is no translation available.
Comment 5 Lars Müller 2007-05-28 13:11:10 UTC
An argument why this isn't added to Samba upstream.

After adding the initial request I thought about adding this feature to the Samba code.  But this might lead to a changed configuration as soon as the administrator changes the locale of the system.  We can't expect from a Samba.org point of view to have a RPM or any other database which at least keeps track of the smb.conf file.

Samba already uses the default value WORKGROUP in param/loadparm.c to the call of set_global_myworkgroup().  Therefore it's possible to remove the global workgroup parameter at all.  Then it's possible for YaST even to track changes if WORKGROUP is used as the parameter.

Andreas, David, Ralf: We had some discussion regarding this feature brefore.  Please check if the suggestion isn't brain dead or at least if I didn't missed anything we discussed before.
Comment 6 Lars Müller 2007-05-28 13:13:04 UTC
'Therefore it's possible to remove the global workgroup parameter at all.' meant to remove the global workgroup setting from Novell's Samba packages smb.conf file.
Comment 7 Lars Müller 2007-05-28 13:16:16 UTC
The benefits of this feature are:

a) The YaST samba modules will be closer to the default behavior of Microsoft
   systems.
b) Any Samba configured with YaST will immediately be part of a potentially
   existing workgroup.
Comment 8 Jiří Suchomel 2007-05-28 13:22:14 UTC
OK, but what if there exist a workgroup called WORKGROUP and YaST changes it to ARBEITSGRUPPE? This is typical problem of programs trying to be too clever.

Additinally, I think that if you want to have a certain default value in smb.conf (which is the point of this request, if I get it right finally), you should provide it by the package itself. What about setting it in rpm post-install script (where you should know the locale)?
Comment 9 Lars Müller 2007-05-28 13:35:04 UTC
a) If the user used Samba's nmbd, smbd, or winbindd there would be log files in
   /var/log/samba/log.*.  And yes, that's the reason why I made existing log files 
   a condition not to change anything with the initial comment.
b) Yes, the intention is to get a localized default value for the global workgroup 
   parameter in smb.conf.
c) By intention this will not be added to the post install script of the RPM.  By
   two reasons:
   aa) No configuration tasks in the RPM scripts (time and risk).
   bb) The change might not be wanted by the user.  The intention of a user
       starting YaST instead is to configure a particular service.
Comment 10 Jiří Suchomel 2007-05-28 13:56:44 UTC
Well... I tend to disagree with aa and bb, but if you really want this behavior, it should be easy to implement (*). Jiri, do you agree with this request?


(*) BTW, there are pending needinfos at you in other cases (bug 240045, feature 120090), please react.
Comment 11 Lars Müller 2007-05-28 14:39:46 UTC
Let's see first if Ralf, Andreas, or David have some additional input.

Changing smb.conf once in the install case of RPM looks like an advantage even to me.
Comment 12 Scott Isaacson 2007-05-29 21:40:38 UTC
As far as what should or should not happen if the locale is changed after the initial install, perhaps we should do just what an MS server does.  For example, if you change the locale after a server is installed, does it change the actual localized string name representing that server in the corresponding name service, or does it just affect the UI and not the SMB server name?

I am still looking at what this change might do for Domain Services for Windows.
Comment 13 Maer Melo 2007-05-30 15:57:34 UTC
Responding to Lars request:

I have installed a "Windows XP SP2 Professional Portuguese Brasil" workstation. See the default translation configured by MS:

locale or country: Brazil Portuguese | pt_br
Workgroup field: GRUPO

If You need any further information, please contact me.
Comment 14 Ralf Haferkamp 2007-06-05 08:10:37 UTC
(In reply to comment #11)
[..]
> Changing smb.conf once in the install case of RPM looks like an advantage
> even to me.
To me that looks more like a source of confusion and possible bugs. Remember the post-install is executed every time you update/install the package. If you have a bug in there you might destroy the whole configuration. So it's IMO wise to keep that part as small and as straight forward as possible.
When it is implemented in YaST it is less likely to cause trouble for people who don't want that feature.
Comment 15 Jiří Suchomel 2007-06-05 08:44:26 UTC
So, could you gather the list of translated entries?
Yes, I've seen your mail on some list, but here is actually only one response to it (comment #13).

Maybe Karl could help?
Comment 16 Karl Eichwalder 2007-06-05 11:41:17 UTC
If you add some such POT file to the yast or lcn directory in the suse-i18n SVN, we will translate it, but only a few of us are familiar with other OSses but openSUSE.

If you want to add the file to the yast directory, talk Jiri (jsrain) who now submit the yast POT files.
Comment 17 Lars Müller 2007-06-05 11:59:46 UTC
A simple translation of the word workgroup doesn't help.

The same wording as used by Microsoft localized products has to be used instead.
Comment 18 jo de baer 2007-06-06 07:09:38 UTC
Hi,

for Belgium / Dutch it's "WERKGROEP" ... probably likewise for the Netherlands.

Tx,

Jo
Comment 19 Jiří Suchomel 2007-07-30 14:17:27 UTC
Lars, don't you want to create a feature from this one? Looks like this kind of asking doesn't lead to expected results...
Comment 20 Jiří Suchomel 2007-08-06 10:48:40 UTC
Giving to samba maintainers to gather required info.
Comment 21 Andreas Schneider 2007-10-15 15:10:29 UTC
I agree with comment #14. Reassigning to Lars.
Comment 22 Lars Müller 2009-09-07 16:42:55 UTC
Move to fate #307622.