Edventures in Normalcy

ColdFusion 11 init.d script

Posted by Rose Bush on September 28th, 2015

I recently installed ColdFusion 11 on RHEL, but the cfinit script did not exist. I then pulled up a ColdFusion 10 init script, updated the CF10-CF11 bits, corrected the coding error for the CFSTATUS section particular to my OS and have the script below:

I then ensured permissions on the file and made sure it would add to startup correctly:

 

cPanel License Verification and Update Script

Posted by Rose Bush on September 17th, 2015

You can run the above to re sync the local status/key.  To verify your machine is licensed, browse to the following and enter in the external IP address:

https://verify.cpanel.net/

Personal use case scenarios for needing to run the aforementioned script are changing the IP on the machine, or if the license has been upgrades, from trial fro example.

Sauce: https://forums.cpanel.net/threads/cpanel-license-activation.97409/

 

After a recent installation of dotDefender, the following error came up:
“Internal Server Error

500

No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_dotDefender.cgi): The subprocess exited with statu s 2 (ENOENT).”

The log file for dotDefender, /usr/local/APPCure-full/log/dotDefender_bpd.log, gives further detail:

The fix was to install Crypt::Passwd::XS as such:

 

Update 1-29-2016

This error popped up again, and seemingly coincided to an upgrade in cPanel.  The upgraded version is WHM 54.0 (build 8).  The error was almost identical to the one above, but instead of outputting the error to the dotDefender log, it was going to the cPanel log (/usr/local/cpanel/logs/error_log) as such:

~

Can’t locate cPanel/PublicAPI.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/cpanel/Cpanel/Accounting.pm line 32.

BEGIN failed–compilation aborted at /usr/local/cpanel/Cpanel/Accounting.pm line 32.

Compilation failed in require at /usr/local/cpanel/whostmgr/docroot/cgi/addon_dotDefender.cgi line 5.

BEGIN failed–compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_dotDefender.cgi line 5.

[2016-01-28 17:35:38 -0500] info [cpsrvd] Internal Server Error: “GET /cpsess122967374/cgi/addon_dotDefender.cgi HTTP/1.1” 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_dotDefender.cgi): The subprocess reported error number 2 when it ended.

~~

Speaking with cPanel support,

This should be fixed. After further review we didn’t acutally rename all of these packages, it looks to maybe only be some API calls rather than the package. This was failing because the following file was modified.

[21:37:25 cp root@7449479 ~]cPs# head /usr/local/cpanel/Cpanel/Accounting.pm

ypackage cPanel::Accounting;

It should have been this looking at another server.

[21:40:42 cp root@7449479 ~]cPs# head Accounting.pm package Cpanel::Accounting;

Once I corrected that I could load the page. I did have a token error and had to login and then got an access error but I believe as root you should have no issue now.

~~~

 

The updated file correcting the issue is below:

 

 

Starting Services That Should Be Running RHEL

Posted by Rose Bush on September 10th, 2015

I recently came across a server that ran services, I was not familiar with, and services were unclear as to the issues I was troubleshooting. As a quick fix, I decided to get a list of services that should be running and start any that were not from that list:

In some cases, the service was not listed as I had expected, so to get the list I had to run the following, where $3 is the service name from the prior commands. In some cases, I had to use $5, as history had a different output:

Now we can find out which are running:

Validate what you are starting, come on, be informed and intentful in what you are doing, and if safe, run the second and third command:

When logging into a fresh installation of SmarterMail 13 and below, I was given the following error:

Oops!

There was an issue that caused this page to malfunction.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
— End of inner exception stack trace —

Server stack trace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
at System.Security.Cryptography.MD5.Create(String algName)
at System.System_ExtensionMethods7BCA73B06BAB478aA3AC6AC60979BA25.GetMD5Hash(String val)
at MailService.Remoting.RemoteSecurity.GetNewKey()
at MailService.Remoting.Mail.InitializeSession()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SmarterMail.RemoteInterface.IMail.InitializeSession()
at SmarterTools.SmarterMail.Remoting.RemoteMail.InitializeSession()
at SMWeb.HelperClasses.Security.LoginHelper.DoLogin(String email, String password, Boolean impersonationLogin, String visitorIpAddress)
at SMWeb.Login.DoLoginInternal(String username, String password, Boolean rememberMe)
at SMWeb.Login.DoLogin()
at SMWeb.Login.btnLogin_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I found that a previous lockdown server in turn caused SmarterMail to fail to login whether using the Built in Web service or a site through IIS. The correction was listed here:
http://support.microsoft.com/kb/2550971

SOLUTIONS:

  • Change the configuration in the application-level Web.config file. Specify that ASP.NET use the Triple Data Encryption Standard (3DES) algorithm to process view state data
  • Disable FIPS compliant algorithms for encryption, and restart the SmarterMail Service.
  • Upgrade to SmarterMail 14

 

To “change the configuration in the application-level Web.config file. Specify that ASP.NET use the Triple Data Encryption Standard (3DES) algorithm to process view state data”: https://support.microsoft.com/en-us/kb/911722

  1. In a text editor such as Notepad, open the application-level Web.config file.
  2. In the Web.config file, locate the <system.web> section.
  3. Add the following <machineKey> section to in the <system.web> section:
  4. Save the Web.config file.
  5. Restart the Microsoft Internet Information Services (IIS) service. To do this, run the following command at a command prompt:
    iisreset

 

“#1 On Windows Server 2008 and in Windows Vista set the registry value for HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled to 0.
On Windows Server 2003 and in Windows XP set the registry value for HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy to 0.
You will need to restart the machine for this setting to take effect.

#2 Launch Local Security Policy from Control Panel->Administrative Tools. Expand Security Settings->Local Policies->Security Options. Open the security policy “System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing” and select the Disabled option. Retstart the machine.”

Copyright © 2026 Edventures in Normalcy. All rights reserved.