Exporting

Ivan Kohler ivan at sisd.com
Tue Jun 29 05:22:07 PDT 1999


On Wed, Jun 23, 1999 at 02:58:05PM -0600, Ben Leibig wrote:
> > On Wed, Jun 23, 1999 at 02:25:34AM -0600, Ben Leibig wrote:
> > > I'm trying to export user shell accounts to systems which ALREADY have a
> > > password file... I tried it, and freeside overwrote the passwd
> > and shadow
> > > files with new ones that only had one entry.
> >
> > You could have imported the passwd and shadow files first.
> >
> Yeah, realize that now, but this still doesn't really do what I want since I
> have all sorts of other utlities(such as unix passwd) that make changes to
> the password and shadow files and would get overwritten by freeside each
> night.

You could use the replacement passwd command, included in the fs_passwd/
directory, and documented in htdocs/docs/passwd.html

I'm not sure what "other utilities" you're speaking of.  Can you
elaborate?  I'm guessing you can replace or modify them.

> > > What I'd really like to do is change freeside so instead of
> > writing a whole
> > > new password file every time it just creates the new entries necessary,
> > > copies them to passwd.new on the remote system, and then
> > appends them to the
> > > end of the file
> > >
> > > cat passwd.new >> passwd
> > >
> > > Is this possable?
> >
> > With the source, anything is possible.  ;)
> >
> > For a transaction (adding a single user), you probably want to add a
> > `shellmachine' (as opposed to `shellmachines') configuration file.  See
> > htdocs/docs/export.html.  You can then modify the insert method in
> > site_perl/svc_acct.pm to do what you want.  You will probably also need to
> > edit the replace and delete methods.
> Why, what is the difference between shellmachine and shellmachines?

shellmachine defines a single machine on which transactions occur - events
or callbacks that are triggered when a particular event happens, such as
adding a user.

shellmachines defines a list of machines which receive exported passwd and
shadow files.

> >
> > MHO is to import first.  The socratic question I'd ask about what you plan
> > to do is "How do you prevent duplicate usernames?"
> >
> Simple, in my case the freeside machine and the shell machine are the same
> system,

Don't do that.  You are doing a grave disservice to your customers by
being careless with their personal information.  Install Freeside on a
separate, secured machine.

> what I would like to do is just check if that username is already
> used on system which freeside is running on, and, well, that's that.
> I'm not really sure how to do this however.  I am just learning perl,
> can you atleast point me to the right place to start poking around...

htdocs/docs/man/index.html, or <http://www.sisd.com/freeside/docs/man>

> > (Not that the hooks in svc_acct.pm couldn't be changable via config files)
> >
> ???

Well, they could.

> You'll have to excuse me, I'm not a great perl programmer, but if you could
> help me hack this out it would be great.

If you're asking, is this mailing list an appropriate forum for general
Perl stuff, well, no, not really.

> This solution offers a metho which makes freeside much more
> integrateable into other systems... Maybe I'm being silly and there's
> ways to do all of this with the import method, I'd  be interested in
> using it if that was the case.  Where can I find more info...

I'm not hiding any documentation or anything.  Yes, it is pretty minimal.
Perhaps better documentation will be contributed.

-- 
Ivan Kohler <ivan at sisd.com> - finger for PGP key - <moc.dsis at navi> Relhok Navi
Open-source billing and administration for ISPs - http://www.sisd.com/freeside
20 4,16 * * * saytime # please don't be surprised if you find me dreaming too



More information about the freeside-users mailing list