3.1. USING THE CPANEL::ACCOUNTING PERL MODULE
CHAPTER 3. FAQ
Q: What do I do when a Guestbook is not showing anything, I get a blank page when trying to view, and no
errors when submitting?
A: Do the following:
chown nobody /home/username/.guestbook
Make sure 'nobody' can write to it.
Q: What do I do when all the Perl/CGI scripts that are not running as root (including Interchange) get the error
getgrgid: invalid groupid XXXXX ? From Apache's error log ...
[Tue Mar 26 09:13:16 2002] [error] [client x.x.x.x] (2)No such file or directory: getgrgid: invalid groupid 32015
[Tue Mar 26 09:13:16 2002] [error] (2)No such file or directory: exec of /home/username/public html/utility.cgi
failed
[Tue Mar 26 09:13:16 2002] [error] [client x.x.x.x] Premature end of script headers: /home/username/public html/script.cgi
A: Do the following:
chmod 644 /etc/group
If that doesn't fix it, check permissions on the passwd file and shadow file as well just for good measure.
Q: What are the default locations for Mailman, exim config, exim log, or the exim reject log?
A: The locations are:
Mailman lists = /usr/local/cpanel/3rdparty/mailman/lists/
Exim Config = /etc/exim.conf
Exim Log = /var/log/exim mainlog
Exim Reject Log = /var/log/exim rejectlog
Q: What do I do when setting up a trust relationship and I get errors about possible security threats and stuff
about SSH/known hosts?
A: Most likely the master server has changed it's ssl info. The easiest way to remedy this is:
1. cd /etc/
2. rm rf .ssh
Then try setting up the trust relationship again.
3.1
Using the Cpanel::Accounting Perl module
The Cpanel::Accounting perl module is designed to give programs that need access to create/remove/modify
accounts an easy way to implement this in their perl program.
For security reasons if you are connecting to a remote server you should set the usessl varible to 1.
You must have the Net::SSLeay perl module installed for this to work.
Cpanel::Accounting supports the following methods:
new Create a new Cpanel::Accounting Object.
showversion Shows what version of WHM the remote server is running.
listaccts Lists currently active accounts.
listpkgs Lists packages avalible for creation.
createacct Creates a new account on the server.
killacct Terminates an account on the server.
suspend Suspends an account on the server.
unsuspend Unsuspends an account on the server.
Below is a sample Perl program.
#!/usr/bin/perl
BEGIN {
76