Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Creating a new Unix group

by c (Hermit)
on Mar 24, 2002 at 16:41 UTC ( #153901=perlquestion: print w/replies, xml ) Need Help??

c has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know of a module that replicates the groupadd/addgroup command in unix? Right now, I am creating the group manually, by reading in /etc/group, finding the highest gid, adding one to it and then appending the new info in the correct format to the end of the file. I now have a system that uses gshadow. Turning off a shadowed groupfile isnt too difficult, but if there was a module out there that dealt with groups, so much the better.

humbly -c

Replies are listed 'Best First'.
Re: Creating a new Unix group
by BeernuT (Pilgrim) on Mar 24, 2002 at 16:51 UTC
    A simple search at CPAN keyword 'group' reveals Unix::GroupFile which looks to deal with UNIX group files.

•Re: Creating a new Unix group
by merlyn (Sage) on Mar 24, 2002 at 16:46 UTC
    I don't know specifically which of "groupadd" or "addgroup" isn't interactive, but I presume one of them is, so what's wrong with simply invoking them from your Perl program?

    -- Randal L. Schwartz, Perl hacker

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://153901]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2023-05-28 02:51 GMT
Find Nodes?
    Voting Booth?

    No recent polls found