Re: Perl module for managing user groups (UNIX)



J.D. Baldwin wrote:


In the previous article, Tim Greer <tim@xxxxxxxxxxxxx> wrote:
What OS are you using, specifically? There are likely commands that
will do all of the error checking, file locking, etc. for you (i.e.,
usermod, groupmod, etc.)

While platform-independence is a nice-to-have objective for the longer
term, all the hosts in the system in question are Solaris 8/9/10 at
the moment.

What I do now involves usermod -- but you can't just tell usermod "add
this guy to this group." You have to say "Assign this guy to
secondary membership of all these groups." As a result, I have to
collect all the existing groups, figure out which ones are
secondaries, error-check the request, then execute the comment. That
error-checking is the most involved step by far; there are a lot of
ways to malform a request. Then we have the case of asking to delete
a user's primary group, which of course involves picking one of the
secondary groups to assign in its place ... and so on and so forth.

It's not that I can't do this, it's just that I'd rather not write 500
lines of code if someone has module-ized the tasks.

Got ya. I can't see the earlier articles in this thread, as my news
reader is configured to drop articles which I've already read after 30
days has passed (that is intentional), so could you (re)post the
relevant code you have now, if you have any? Pardon me if you've
already posted it. Sorry, I don't personally know of an existing
module for this, but there could be one. I'm sure there are some
existing solutions out there posted, which could probably be modified
if they aren't exactly what you need now... but your own code might be
close enough now for that task, too.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
.



Relevant Pages

  • Re: secure sites
    ... Please take a look at MS KB articles: ... Troubleshoot Situations Where You Cannot Connect to Secure Web ... Sites by Using Internet Explorer in Windows XP" ... Providing expertise in hosting applications MS Exchange Hosting: http://www.intermedia.net/exchangehosting Windows 2000 Web Hosting: http://www.intermedia.net/webhosting For a waiver of the set up fee use "IMFREE" code Support: http://www.intermedia.net/support/ "Vicky" wrote in message ...
    (microsoft.public.security)
  • Re: (Ubuntu Linux 8.10) [01/23] - "ubuntu-8.10-desktop-i386.iso.001" yEnc (01/78)
    ... Fetching articles for alt.linux. ... alt.linux: Retrieving articles 135065-136285. ... Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers ...
    (alt.linux)
  • Re: One network, two businesses
    ... hosting is not what I am talking about. ... Did you have a chance to review those articles? ... They provide exact advice how to achieve what you want, ... separation complete with separate GALs etc. ...
    (microsoft.public.windows.server.sbs)