I am writing an administration tool and I thought perl would be more interesting than ksh, but I am running before I can walk.
To begin with I am loading up some data structures, so I use getgrent within a loop to read the group data. No problem.
At some stage I may modify the group data. I then want to reload the data.
My problem is that the second attempt to run a getgrent loop returns an empty structure. I guess that somhow I need to reset whatever pointer the getgrent function uses.