in reply to Passwdfile.pm help?

$pw = new Unix::PasswdFile, "/etc/passwd";

is a typo, for starters - seems to work fine (I'm testing it out now) if you write:

$pw = new Unix::PasswdFile "/etc/passwd";

instead - no comma after the package name.

As for writing a script like this? I've been working with a 6 year old kluge for years because it's easier that what you are undertaking. It's generally a huge pain in the butt. I wish you the best, and if you have any questions, feel free to /msg me.

Replies are listed 'Best First'.
Re: Re: Passwdfile.pm help?
by vivekvp (Acolyte) on Aug 08, 2002 at 19:45 UTC
    Hey Ferret!
    I know this request sounds like a pain - but we have 2 groups - a very busy one that gets request for adding users and doing other work.
    And another not so busy group with less experience. We want the less experienced group to add the passwords - with out messing up the original file.

    Where are the sysadmins - well this task of adding passwords is above them.

    I was tasked to write a script to allow additions - so here I am trying (and failing badly). Just lookin' for help!

    Thanks for seeing that syntax error - I went coo coo. So simple - for others to see!

    V
    He who laughs last, doesn't get the joke.

      Oh, don't think I'm belittling your task, please! Quite the opposite - I know your pain quite well (though I am a sysadmin, and have just managed to fob off the job of password requests on our help desk)

      Now, just to clarify - you want someone to be able to do bulk password changes? Or am I missing something?

      Glad to help with the typo, not a problem at all. Lemme know how Unix::PasswordFile works for you

        Hello
        Basically we have to allow users on to our frontends - and there are quite a few - but they trickle in - sometimes one a day, sometime 15.
        This task could be handled by our 2nd level as well - we do not want to have to edit the password file - just incase.

        Passwdfile.pm is a nice way to drop in a user and back it up. They just enter the Unix ID and path - and off they go.
        I am wrestling with passwdfile.pm - I have to make sure i have decent validation.
        You ever use passwdfile.pm?

        Thanks,

        V
        He who laughs last, doesn't get the joke.