Exporting

Ivan Kohler ivan at sisd.com
Wed Jun 23 04:22:42 PDT 1999


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.

> 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. 

MHO is to import first.  The socratic question I'd ask about what you plan
to do is "How do you prevent duplicate usernames?" 

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

-- 
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