Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Creating a new Unix group

by c (Hermit)
on Mar 24, 2002 at 16:41 UTC ( [id://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.

    -bn
•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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found