Bug 555579 - yast removes all "idmap config" entries from smb.conf
Summary: yast removes all "idmap config" entries from smb.conf
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: x86-64 openSUSE 11.2
: P5 - None : Normal with 2 votes (vote)
Target Milestone: ---
Assignee: Jiří Suchomel
QA Contact: Jiri Srain
URL:
Whiteboard: maint:released:sle11-sp1:34611
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-14 11:57 UTC by Di Pe
Modified: 2010-11-08 16:08 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2log as requested (1.34 MB, application/x-gzip)
2009-11-19 08:17 UTC, Di Pe
Details
patch for /usr/share/YaST2/scrconf/cfg_smbconf.scr (565 bytes, patch)
2009-11-24 09:49 UTC, Jiří Suchomel
Details | Diff
patch for /usr/share/YaST2/modules/SambaConfig.pm (3.33 KB, patch)
2009-11-24 09:50 UTC, Jiří Suchomel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Di Pe 2009-11-14 11:57:31 UTC
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB5 (.NET CLR 3.5.30729)

When I start the Windows Domain Membership applet in yast after I added idmap config entries to the [global] section of smb.conf, the applet stalls for some time. When I save some changes it removes all my "idmap config" entries from smb.conf. These entries have been working fine and should not be removed.




Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Shuang Qiu 2009-11-17 08:58:06 UTC
Could you please attach y2logs according to http://en.opensuse.org/Bugs/YaST.
Thanks.
Comment 2 Di Pe 2009-11-17 11:55:37 UTC
sorry, these logs seem to be huge and I don't actually have the time to clean the logs from unwanted information. 
I hope you still find it easy to reproduce the error
Comment 3 Di Pe 2009-11-19 08:17:10 UTC
Created attachment 328386 [details]
y2log as requested

OK, requested logs are attached
Comment 5 Jiří Suchomel 2009-11-19 09:59:03 UTC
Do you have an example of how the original smb.conf looked like and what was deleted?
Comment 7 Di Pe 2009-11-20 10:29:29 UTC
BTW: The idmap feature is REALLY helpful for centralized, enterprise wide uid/gid management. 2 more options should be added to the yast applet 

1. configure a uid range for idmap entries
2. offer a choice for ActiveDirectory schema (legacy=sfu or Windows 2003 R2 and newer = rfc2307)


http://www.likewise.com/ offers these very useful features in their software but there is no need to purchase any extra software
Comment 8 Di Pe 2009-11-20 10:32:43 UTC
sure, here you go:

BEFORE:

[global]
        workgroup = XXXXX
        passdb backend = tdbsam
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        include = /etc/samba/dhcp.conf
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = No
        security = ADS
        idmap gid = 2000-4999
        idmap uid = 2000-4999
        realm = XXXXX.ORG
        template homedir = /home/%U
        template shell = /bin/bash
        winbind offline logon = yes
        winbind refresh tickets = yes
        ;log level = 3 winbind:5 idmap:5
        winbind enum users = Yes
        winbind enum groups = Yes
        winbind nss info = rfc2307
        winbind use default domain = yes
        ;idmap domains = XXXXX #not needed in latest samba
        idmap config XXXXX:cache time = 1800
        idmap config XXXXX:range = 5000-65000
        idmap config XXXXX:backend = ad
        idmap config XXXXX:schema_mode = rfc2307
        idmap config XXXXX:default = yes

AFTER

[global]
        workgroup = XXXXX
        passdb backend = tdbsam
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        include = /etc/samba/dhcp.conf
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = No
        security = ADS
        idmap gid = 2000-4999
        idmap uid = 2000-4999
        realm = XXXXX.ORG
        template homedir = /home/%D/%U
        template shell = /bin/bash
        winbind offline logon = yes
        winbind refresh tickets = yes
        ;log level = 3 winbind:5 idmap:5
        winbind enum users = Yes
        winbind enum groups = Yes
        winbind nss info = rfc2307
        winbind use default domain = yes
        ;idmap domains = XXXXX #not needed in latest samba
Comment 9 Jiří Suchomel 2009-11-20 10:35:32 UTC
(In reply to comment #7)
> BTW: The idmap feature is REALLY helpful for centralized, enterprise wide
> uid/gid management. 2 more options should be added to the yast applet 

Please, ask for new features at different place, so it is possible to track them, ideally, use features.opensuse.org
Comment 10 Jiří Suchomel 2009-11-20 14:31:33 UTC
The problem is that there are some keys with uppercase ('XXXXX' in 'idmap config XXXXX:cache time = 1800). Before I try to fix yast2 module to handle it correctly, I'd like to ask: is it allowed configuration, to have uppercase in config file keys (not values)?
Comment 11 Di Pe 2009-11-21 05:48:07 UTC
confirmed: uppercase is actually the default in sample docs like this:

http://samba.org/~obnox/presentations/sambaXP-2009/sambaxp-2009-talk-obnox-slides-paper.pdf

A Windows AD domain it mostly shown in uppercase
Comment 12 Jiří Suchomel 2009-11-24 09:49:37 UTC
Created attachment 329129 [details]
patch for /usr/share/YaST2/scrconf/cfg_smbconf.scr
Comment 13 Jiří Suchomel 2009-11-24 09:50:48 UTC
Created attachment 329131 [details]
patch for /usr/share/YaST2/modules/SambaConfig.pm
Comment 14 Jiří Suchomel 2009-11-24 10:17:11 UTC
I've built new package, containing the patches above, Could you please test it with your config files?

The package could be found at

http://download.opensuse.org/repositories/home://jsuchome/openSUSE_11.1/noarch/yast2-samba-client-2.19.1-2.1.noarch.rpm
Comment 15 Di Pe 2009-11-26 12:01:45 UTC
Yes, that fixes it.

Thanks much
Comment 16 Di Pe 2009-11-26 12:06:50 UTC
I noticed one more thing: 

most people I know want 

template homedir = /home/%U

instead of 

template homedir = /home/%D/%U

however, the yast applet always resets to 
template homedir = /home/%D/%U 
if I make a manual change in smb.conf


I believe this fix should be part of this ticket rather than submitting a new one ?

Also:
the initial slowness in starting up the applet was because I set 
        winbind enum users = Yes
        winbind enum groups = Yes

The slowness is caused by enum groups (I think we have about 7 billion). "enum users" of our 3000 users did not cause any delay.


I have another few issues for which I will start a new ticket.
Comment 17 Di Pe 2009-11-26 12:30:56 UTC
additional feature:

This populates the fields in the "Operating System" Tab in Active Directory Users and Computers. It also populates the the user pricipal name for nfs services so this configuration can be used for kerberized nfs. This is tested and works. ($netbios_name and $realm seem to be blank and $domain should be dns doamin instead of windows domain) 

I will also put in a feature request for this. 

createupn=nfs/host.domain.org@REALM.ORG

--- SambaNetJoin-org.pm 2009-08-21 03:02:55.000000000 -0700
+++ SambaNetJoin.pm     2009-11-26 02:54:13.054810757 -0800
@@ -85,6 +85,7 @@
     my $cmd            = "";

     my $include                = "";
+    my $realm           = "";
     # bnc#520648 (DHCP may know WINS server address)
     $include   = "\n\tinclude = /etc/samba/dhcp.conf" if (SCR->Read (".sysconfig.network.dhcp.DHCLIENT_MODIFY_SMB_CONF") eq "yes");

@@ -105,7 +106,9 @@
        . " -s $conf_file"
        . (($protocol ne "ads" && $netbios_name)?" -n '$netbios_name'":"")
        . " -U '" . String->Quote ($user) . "%" . String->Quote ($passwd) . "'";
-
+    #dipe change
+    $cmd = $cmd . " createupn=nfs/" . $netbios_name . $domain . "@" . $realm . " osName=Linux osVer=\"`cat /etc/SuSE-release | grep openSUSE`\"";
+
Comment 18 Jiří Suchomel 2009-11-27 15:25:15 UTC
Closing the bug as the original issue is resolved.
Fix is in packages yast2-samba-client-2.19.1 (FACTORY) and yast2-samba-client-2.17.13 (SLE11SP1).

Please, report the remaining issues separately (I've already done it myself for the last proposal, which is now bug 558730).
Comment 19 Swamp Workflow Management 2010-11-08 16:08:37 UTC
Update released for: yast2-samba-client
Products:
SLE-DESKTOP 11-SP1 (i386, x86_64)
SLE-SERVER 11-SP1 (i386, ia64, ppc64, s390x, x86_64)