CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Using getgrent() on external Group File

 



chtaylo2
New User

Nov 11, 2009, 10:39 AM

Post #1 of 3 (2282 views)
Using getgrent() on external Group File Can't Post

Perl has built in group search functions such as getgrent(), getgrnam(), etc.
When using them, they look at the /etc/group file on your unix box. Is there a way to specify a different file these functions look at?


Background: I'm creating a system which pulls in the group file modifies it and pushes out a new one. The issue is, /etc/group is not actual file it modifies, however it is in all the same format.



Thanks!
Chris


FishMonger
Veteran / Moderator

Nov 11, 2009, 12:11 PM

Post #2 of 3 (2272 views)
Re: [chtaylo2] Using getgrent() on external Group File [In reply to] Can't Post


Quote
I'm creating a system which pulls in the group file modifies it and pushes out a new one.


Wrong/bad approach

You should not edit the files manually. You should ssh into the remote system and execute the appropriate utility that updates the required file.


chtaylo2
New User

Nov 11, 2009, 12:18 PM

Post #3 of 3 (2269 views)
Re: [FishMonger] Using getgrent() on external Group File [In reply to] Can't Post

Before telling me I'm doing it wrong, can you help me solve my issue ? This is a NIS+ system so group files are not locally stored. I'm trying to keep my post as simple as possible...no reason to explain all of this.



Does anyone know how to do this?

Thanks in advance!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives