CPANEL doesnt do anything with the accounts

mrpaul123

Registered
Dec 30, 2005
4
0
151
Ok so i made a huge booboo, :( , i accidentally moved everything in / to one of the public_htmls. soooo i used knoppix to move everything back to place... now i cant add accounts or terminate or modify them. I tried using /scripts/killacct user and i get the following error

Can't locate RcsRecord.pm in @INC (@INC contains: /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /scripts) at /scripts/killacct line 12.
BEGIN failed--compilation aborted at /scripts/killacct line 12.

Please help me :(

Thanks in advance.
 

Murtaza_t

Well-Known Member
Jan 24, 2005
474
0
166
Earth
cPanel Access Level
Website Owner
You can try and follow these stpes :

-- Login into shell
-- run : ll -ld /usr/local/cpanel/RcsRecord.pm
permission should be :
-rwxr-xr-x root root /usr/local/cpanel/RcsRecord.pm

If the file does not exist the do this :

-- pico /usr/local/cpanel/RcsRecord.pm

and paste the code bellow :

Code:
#!/usr/bin/perl
# RcsRecord.pm                     Copyright(c) 1999-2004 cPanel, Inc.
#                                 All rights Reserved.
# [email protected]              http://cpanel.net

package RcsRecord;

use SafeFile;
use Carp;

use vars qw(@ISA @EXPORT $VERSION);

require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw(rcsrecord);

$VERSION = '3.0';

sub rcsrecord {
   my($file,$description) = @_;
   my($pid);

   if ($pid = fork()) {
#master
   } else {
      open(STDOUT,">/dev/null");
      open(STDERR,">/dev/null");
      $SIG{'PIPE'} = 'IGNORE';

      my (@DIR) = split(/\//, $file);
      my ($truefile) = pop(@DIR);
      my($dir) = '';
      if ($#DIR > -1) { 
         $dir = join("/", @DIR);
      }

      my $rcslock = SafeFile::safeopen(\*RCSFILE,"<",$file);
      if ( -e "${dir}/,${truefile}," ) {
         my($mtime) = (stat("${dir}/,${truefile},"))[9];
         if ( (time() - $mtime) > 3600 ) {
                unlink("${dir}/,${truefile},");
         }
      }
      if (! -e "${dir}/${truefile},v") {
         open(RCS,"|-") || exec ("rcs","-q","-i","$file");
         print RCS "Init by $0\n";
         close(RCS);
      }
      open(RCS,"|-") || exec ("ci","-l","$file");
      print RCS "Modified by $0\.\n";
      close(RCS);
      if ( (stat("${dir}/${truefile},v"))[7] > ((stat(${file}))[7] * 10) ) {
                my $lt = localtime(time()-(86400*30));
                my ($head,$rev);
                open(RCS,"-|") || exec ("rlog","-d\"${lt}\"",$file);
                while(<RCS>) {
                        if (/head:[\s\t]+([\d\.]+)/) {
                                $head=$1;
                        }
                        if (/revision[\s\t]+([\d\.]+)/) {
                                $rev=$1;
                        }
                }
                close(RCS);
                if ($rev eq $head) { $rev -= 0.1; }

                if ($rev ne "") {
                        system("rcs","-q","-o:${rev}","$file");
                }
      }
      SafeFile::safeclose(\*RCSFILE,$rcslock);
      $SIG{'PIPE'} = 'DEFAULT';
      exit();
   }
   waitpid($pid,0);
}
make sure that it has the permission above.
 
Last edited:

mrpaul123

Registered
Dec 30, 2005
4
0
151
Thanks for the reply, I checked the permissions and they're all the same. The file exists and it's the same as well, still I get the same error.


actually for some reason now it cant find AcctLock.pm

Can't locate AcctLock.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/i686-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /scripts /scripts /scripts /scripts /scripts /scripts) at /scripts/killacct line 15.
BEGIN failed--compilation aborted at /scripts/killacct line 15.
 
Last edited:

mrpaul123

Registered
Dec 30, 2005
4
0
151
ok nevermind... on different computers i get different errors.... any ideas? I upgraded perl and still made no difference.
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
double check your files in /scripts

killacct is looking for RcsRecord.pm and AcctLock.pm in the /scripts directory not in /usr/local/cpanel.

# more /scripts/killacct

BEGIN {
push(@INC,'/scripts');
}

# ls -al /scripts shows

-rw-r--r-- 1 root wheel 1352 Nov 1 2004 AcctLock.pm
-rwxr-xr-x 1 root wheel 2050 Jan 19 2005 RcsRecord.pm

it is also looking for the following files

/scripts/cPScript/iContact.pm
/scripts/SafeFile.pm
/scripts/cPScript/HttpUtils.pm
/scripts/cPScript/Errors.pm
/scripts/cPScript/DbUtils.pm
/scripts/cPScript/Mysql.pm
/scripts/cPScript/SafetyBits.pm
/scripts/cPScript/cPanelFunctions.pm