Re: [system-tools]users tool on SuSE



On Fri, 27 Feb 2004 08:57:26 +0000, James Ogley wrote
> Great news on the new list - w00t! :)
> 
> Anyway, as some of you will know, I've been working on support for SuSE
> in GST (specifically SuSE 9.0 at this stage, will add older versions
> once I'm happy with the 9.0 support), but I'm having some problems with
> the users tool.
> 
> The problem stems from the fact that the default group for a new 
> user on SuSE is 'users', not $user, but that in /etc/login.defs, 
> users (GID 100) is significantly lower than GID_MIN (1000), so we 
> have to use SYSTEM_GID_MIN (100) on SuSE.
> 
> I've changed the code to what I think should do this, but it doesn't.
> 
> I'm using a regexp to test if $gst_dist begins with 'suse', but it
> doesn't seem to pick it up.  I tested by explicitly testing if $gst_dist
> == "suse-9.0", and that worked.  However, it also worked when I randomly
> tested it with $gst_dist == "caned-4.7" - ie if I did an explicit 
> test it returned true no matter what...
> 
> The relevant code is in my blog entry at
> http://swamprat.homeunix.org/index.cgi/2004/02/26#20040226-4 - if anyone
> can look over it, and see something that I've missed, I'd really
> appreciate it.

OK, I think I got it, if you're doing this in the same place where
%login_defs_prop_map is nowadays defined, then the code actually works, but
$gst_dist isn't still defined, so it falls to the else statement.

In my very humble opinion, you might do something like:

%login_defs_prop_map = ();

@login_defs_prop_array_suse = (....);
@login_defs_prop_array_default = (....);

$login_defs_prop_dist_map =  {
  "redhat-5.2" => $login_defs_prop_array_default,
  ....
  "suse-9.0"   => $login_defs_prop_array_suse
};

and create a function to generate %login_defs_prop_map from $gst_dist and
$login_defs_prop_dist_map and use it where %login_defs_prop_map is used. Of
course the same goes for %profiles_prop_map.

        Regards

> 
> James
> -- 
> James Ogley, Webmaster, Rubber Turnip james rubberturnip org uk
> http://www.rubberturnip.org.uk Jabber: riggwelter myjabber net
> Using Free Software since 1994, running GNU/Linux (SuSE 9.0)
> GNOME updates for SuSE: http://www.usr-local-bin.org
> _______________________________________________
> system-tools-list mailing list
> system-tools-list gnome org
> http://lists.gnome.org/mailman/listinfo/system-tools-list


--
Carlos Garnacho <garnacho tuxerver net>
                <carlosg gnome org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]