OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003861 [cas_usergroup] other feature N/A 2009-08-19 09:23 2011-05-15 15:40
Reporter ja View Status public  
Assigned To bonivart
Priority normal Resolution fixed  
Status closed  
Summary 0003861: Feature request cswusergroup: Add a user to more than one group
Description It would be nice, if it was possible, to add a user to multiple groups via the cswusergroup file.

Example: The user "nagios" should be added to the primary group "nagios" and the secondary group "nagioscm".
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0006589)
bonivart (developer)
2009-08-19 09:52

Maybe it can be done by allowing multiple groups separated by commas:

user:group1,group2,group3:gcos:dir:shell:create_dir:remove_dir

Group1 in the example would be primary and the rest secondary.
(0009011)
bwalton (administrator)
2011-04-28 03:09

How about extending the field list to:

user:group:gcos:dir:shell:create_dir:remove_dir:pw:aux_grp1,aux_grp2

The aux_grp1,aux_grp2 list could be fed to useradd -G...? (Maybe a second call to usermod -G if [ -n "$9" ]...

Should be a fairly quick addition. Is this still desired?
(0009012)
ja (developer)
2011-04-28 11:18

Yes, at least I would use it.

Another point: It could be also nice to alter an arbitrary user. For example the already existing user "nobody" has to be added to group "foo". Is this already possible or should a new feature request be opened for this?
(0009017)
bwalton (administrator)
2011-04-30 03:38

I just proposed the following patch on the devel@ mailing list:
http://lists.opencsw.org/pipermail/devel/2011-April/019015.html [^]

This allows supplying a list of auxiliary groups for a user.

Your other request, extending group membership of an existing user is not possible with the current class action script and I'm not sure an extension is sound. This would likely be better served by a separate script.

Thanks
-Ben
(0009020)
bwalton (administrator)
2011-05-02 22:20

I've placed an experimental package in http://buildfarm.opencsw.org/opencsw/experimental/cswusergroup/. [^] Can you test it with your own packages? It works for my testing with the bacula update.

Thanks
-Ben
(0009026)
ja (developer)
2011-05-07 18:55

Is it possible to add these auxiliary groups, in case they don't exist?

Thank you
Juergen
(0009027)
bwalton (administrator)
2011-05-07 22:39

In the interest of keeping the script simpler, couldn't the package simply deliver any additional groups referenced by this parameter as unique cswusergroup entries (or files)? That's what I envisioned anyway...I guess it wouldn't be too hard to add on-demand though. Thoughts?

Thanks
-Ben
(0009031)
ja (developer)
2011-05-08 13:58

Oh, I just wasn't aware of this. Of course it's possible to deliver additional groups.

So, the current solution to add a user to more than one group works with the experimental package without a problem. Thank you for your effort.

Juergen
(0009054)
bwalton (administrator)
2011-05-15 15:40

Updated package pushed for release. It'll (hopefully) be available shortly.

-Ben


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker