[freeside-users] problem with passwd.import

Shaun Medvec ddrac at straitsarea.com
Tue Apr 11 00:31:46 PDT 2006


Freeside 1.5.7 Current from freeside site on Fedora Core 4  (x86_64)
HTML::Mason 1.3101-3.fc4 - noarch
Perl 5.8.6-22 - x86_64 arch
PostgreSQL 8.0.7-1.FC4.1 - x86_64 arch
DBI 1.48-4 - x86_64 arch
DBD::Pg 1.41-2 - x86_64 arch

All above listed items are RPM installed or upgraded via yum

Array::PrintCols - installed 4/0906 - latest from CPAN
Term::Query (2.0) - installed 4/0906 - latest from CPAN


I am trying to import legacy data, and all is fine up until this script (I believe) tries to start entering the data.

I get this error after attempted scp download of passwd and shadow files using this script


readline() on closed filehandle SHADOW at ./passwd.import line 74.
readline() on closed filehandle PASSWD at ./passwd.import line 84.

 meaning the files weren't there.  I manually ran scp -pr root at serv.mydomain.com:/etc/passwd /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/passwd.import
 and scp -pr root at serv.mydomain.com:/etc/shadow /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/shadow.import and it worked instally without problems as I have rsa keys generated for freeside user, and stored in servers authorized_keys file

So I dont see any errors on this, nor does it work.

But that is just problem one.  After I manually ran those commands to fetch the passwd and shadow files, then re-ran the script as shown below:::


***********************************

./passwd.import **sanitizedusername**
"my" variable $cols masks earlier declaration in same statement at /usr/lib/perl5/site_perl/5.8.6/Array/PrintCols.pm line 60.


2: Main Account
3: Extra E-mail
4: Import

Enter part number to import.
Enter part number: 4


Enter the location and name of your _user_ passwd file, for example
"mail.isp.com:/etc/passwd" or "nis.isp.com:/etc/global/passwd"
:serv.mydomain.com:/etc/passwd
scp -pr root at serv.mydomain.com:/etc/passwd /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/passwd.import
Proceed [y/N]:y


Enter the location and name of your _user_ shadow file, for example
"mail.isp.com:/etc/shadow" or "bsd.isp.com:/etc/master.passwd"
: serv.mydomain.com:/etc/shadow
scp -pr root at serv.mydomain.com:/etc/shadow /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/shadow.import
Proceed [y/N]:y


DBD::Pg::db selectcol_arrayref failed: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
 at /usr/lib/perl5/site_perl/5.8.6/FS/Record.pm line 1536
        FS::Record::virtual_fields('FS::svc_acct') called at /usr/lib/perl5/site_perl/5.8.6/FS/svc_Common.pm line 50
        FS::svc_Common::virtual_fields('FS::svc_acct') called at /usr/lib/perl5/site_perl/5.8.6/FS/Record.pm line 229
        FS::Record::qsearch('svc_acct', 'HASH(0x2872500)') called at /usr/lib/perl5/site_perl/5.8.6/FS/Record.pm line 461
        FS::Record::qsearchs('svc_acct', 'HASH(0x2872500)') called at ./passwd.import line 91

***********************************

The first line ""my" variable $cols masks earlier declaration in same statement at /usr/lib/perl5/site_perl/5.8.6/Array/PrintCols.pm line 60." makes me wonder if that is what is causing the eventual DBD::Pg::db error at the bottom.  Would that be an accurate assumption, and what would be the recommended course of action?  I get the same $cols variable error and a similar DBD::Pg::db error when I run the svc_acct.import script.


Any thoughts, suggestions, or solutions would be much appreciated, and thank you in advance.

Shaun Medvec
Straits Area Internet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://420.am/pipermail/freeside-users/attachments/20060411/e7b7de8c/attachment.html


More information about the freeside-users mailing list