WHM and cPanel database and settings storing place - cpanel

I'm trying to figure out where all WHM settings are stored. I got a task to prepare some template with WHM and cPanel installed but I can't find anywhere any information what is the name of the database where information (with settings) are stored.
I'm precisely looking for the option to turn on email notification in cPHulk about banned user IPs. I know that I can set it up later but I don't want to make any of initial setup in WHM/cPanel.
Is any chance to manually change this settings value ? (either in database or file).
I'm looking as well where are stored values for WHM option: "Show IP Address Usage"

By default, you can only preconfigure WHM using cpanel.config file as described in their docs: https://documentation.cpanel.net/display/1144Docs/The+cpanel.config+File
Unfortunately, this only covers 'Tweak Settings' section, so you can't preconfigure cPHulk using it. One of the alternatives would be to use WHM API and fire it after the server is installed. With this API you have way more options, e.g. cPHulk controls are there: https://documentation.cpanel.net/display/SDK/WHM+API+1+Functions+-+load_cphulk_config

Related

Prevent content (files) upload to cpanel

I am new to Management System. Now I need to control a website. Some days ago, someone hack it — not SQL injection, just file change / new files upload.
I need to know the how can I prevent it; I want to learn.
Please, can someone give me some suggestions?
To prevent this, You need to update your server security with the mod_security, Mod_security is web server firewall so you will have to install and upadte mod_sec rules on your server to prevent this,
Also, Update your site scripts and plugin and themes which you are using for your site.
Use strong password for your cPanel, FTP and site admin panel
Also, Check WHM >> Security Center >> Security Advisor and fix all the Warning which you will get in that scan report.
Install maldet on your server and scan your all user home directory and remove infected files from your account.

WHM / CPANEL Server migration

Sorry about English, Actually i have been looking for best article about WHM/CPANEL server migration but i could not find yet. Hope this is the right platform.
I have one WHM/CPANEL server running with CentOS x86_64 standard. Now i want to migrate all stuff to my new high end machine.
Need to Transfer: (All accounts along with databases, Exim configuration, Tweak settings, PHP etc etc).
Note: I need step by step guide which will be highly appreciated, I am not too much technical and in learning phase so please go easy on me.
Thanks in advance.
First you need to install and setup cPanel on your new server.
After that you can migrate your all cPanel account to new server through transfer tool. WHM >> Transfers >> Transfer Tool
Here are the some useful docs.
https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another
cPanel setting are stored in /etc/wwwacct.conf and /var/cpanel/cpanel.config file so you can copy that setting to new server.
After the server setup is complete, you will have to recreate all the accounts you wish to move, on the server. You can create the domains in your server using the WHM and then restore the website contents manually using a FTP client(say FileZilla).
First you have to take the backup of your domain via cPanel. Please check below URL to find information regarding this:-
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/BackupWizard#Backup your entire site
Then Create the account in WHM.
Upload the contents in these newly created domain and restore them via WHM or cPanel.
To restore via WHM please follow below steps:-
Main >> Backup >> Restore a Full Backup/cpmove file
Please refer the cPanel docs link below on how to restore an account via cPanel.
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/BackupWizard#
If you have cpanel WHM server and you want to transfer your whole server accounts and websites to another WHM server then its really very easy and simple. All you need is root access of both server.
If you have set up your high end new WHM server, then login to your new WHM with root user and go to transfer tool from WHM > Transfers > Transfer Tool. It will show you fields to input the details of your low end server. Once you provide the root information of server it will fetch the accounts lists and account details. From there you can select which accounts to transfer and which to not. If you want to transfer all accounts then you can select all and proceed the transfer. It will transfer all your accounts with their current package details.
Try the cpanel transfer tool its easy and simple to understand and proceed.
https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another
https://documentation.cpanel.net/display/ALD/Transfer+Tool

How to reset storage password in Mule Studio

I have downloaded new version of mule studio, and I am trying to configure it. First I am trying to set network connections. After editing proxy entries, when I click on apply I am presented with "please enter the secure storage password". I have not set any such password.
and I do not see any option of resetting it. Long time ago I had installed some earlier version of mule studio. I did simply delete that directory before reinstalling new one. Could that be a problem. In any case what would be a way out.
Thanks for your help or suggestion on where to look.
Could be due to the old installation, as the Secure Storage file location is usually some hidden Eclipse settings directory. It is used to store proxy authentication data. See Preferences -> Security -> Secure Storage for the Secure Storage settings, and specifically the Contents tab for Storage location and the Delete button that should delete the previous Secure Storage. A restart might be needed.

How do I configure Openfire to use custom database using openfire.xml?

I tried out this guide from the Openfire documentation but none of my changes seem to have been applied. I can't login as any of the user from my custom database even if I set user names as admin. Do I need to manually apply all the changes to the system properties stored in the database (Openfire's ofProperty table)?
I'd also like to know if there's a way to prevent or customize which tables Openfire will add to my database.
Here's what I did to setup external database (in my case MySQL):
Assuming that you have a running Openfire instance, you should stop the server and edit the openfire.xml
Just add <setup>false</setup> so next time you open the web interface you will be directed to the setup page which will allow you to select and setup your database server.
From Openfire install directory copy the SQL query from /resources/database (choose the one for your specific database, in my case I used openfire_mysql.sql)
Of course you need to setup privileges.
From there I just followed the wizard and put the information in the input fields when setting up the database, like IP address, username and password that I have setup in the privileges in phpMyAdmin. Everything should be up and running within minutes.
In case you get error when setting up the database from the web interface, try to check if your database server MySQL port is open, its 3306. Do some sudo iptables if its not.
Hope this helps.

Finding An LDAP URL?

I would like to access the company server's Active Directory so I can write a simple phonebook program. It would seem that I need to use LDAP to connect to it in order to grab a recordset. Is there anyway to figure out what the LDAP URL is based on settings and properties in Outlook (or otherwise)?
Can some one help me to understand these Ldap field and to fill the values!
Thanks
I am assuming you are writing VBA. In Outlook, you can use ADO to make the query against the LDAP provider. The query is composed of four parts
Base path
Search filter
attributes returned in the recordset
Search scope.
The LDAP URL that you meantioned is actually the base path of the LDAP query. You can use ADSIedit to get the base path in your local domain. Normally, if your domain is called abc.com, your base path should be something like LDAP://abc.com/DC=abc,DC=com. However, it's not always the case. Active Directory allows you to name an Active Directory domain different from the DNS domain, although most of the time, they are the same. This configuration is called disjoint namespace.
For the disjoint namespace case, to find out the correct base path, you can install ADSIedit from Windows 2003 support tools. Launch the ADSIEdit by typing adsiedit.msc in command line. Right click the ADSIEdit node and click "Connect to". Then, select the naming context "RootDSE" and leave all other settings as default to connect to the local domain. If your machine is joined to the domain already, you should be automatically connected to that domain. In the top RootDSE node, you should also see what domain controller you are connected to now. Mark down the FQDN of the connected domain controller. It should be something like dc1.yourdomain.com. Then, Expand the top "RootDSE" node and you will see another "RootDSE" folder node underneath. Right click and click properties. Find the defaultNamingContext. It should be something like DC=yourdomain,DC=com.
With the domain controller name and the default naming context, you can create your base path, it should be LDAP://domain controller/default naming context
Sometimes you see people putting in FQDN domain name instead of domain controller name in the LDAP base path. This is legitmate only if the A record of the domain exists on the DNS server. I don't recommend using domain name. However, if you really don't want to specify a specific domain controller, you can consider to use serverless binding. LDAP://default naming context. It's an Active Directory feature. It doesn't work on other LDAP servers. You can use serverless binding only if you are running as a domain user. When you use a serverless binding, the LDAP query will simply pick the next available domain controller in the site for you. In this way, you reduce the chances of overloading that server with requests. However, this also makes your result less predictable because sometimes the data is not yet replicated from one domain controller to another domain controller.
Just a side note, I am suggesting you to use the domain naming context as your search base path because I assume you want to search all the users under your domain. You can always pick some other containers as your base path. For example, LDAP://yourdomain.com/CN=Users,DC=yourdomain,DC=com. Then, the search will be done only under the Users container in your domain.
An alternative quick lookup is to run nslookup from Windows - Run
This should give you the Default Server.
See here for more info:
https://serverfault.com/questions/78089/find-name-of-active-directory-domain-controller
You can then connect with AD Explorer (http://technet.microsoft.com/en-ca/sysinternals/bb963907.aspx) to make sure that it is correct.
Building on Harvey's answer, if you need to do this on a Windows 7 computer, you will need Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1).
Open the start menu, there may be a menu called 'Administrative Tools' on the right-hand side. If so, it should have 'ADSI Edit' in it.
If the menu is not available, or if ADSI Edit is not in the menu, Then follow the following (annotated) instructions from Windows help:
Click Start, click Control Panel, and then click Programs.
In the Programs and Features area, click Turn Windows features on or off.
If you are prompted by User Account Control to allow the Windows Features dialog box to open, click Continue.
In the Windows Features dialog box, expand Remote Server Administration Tools.
Select the remote management tools that you want to install (Role administration tools > AD DS and AD LDS tools > AD DS Tools > Active Directory Administration Center), and then click OK.
Configure the Start menu to display the Administration Tools shortcut, if it is not already there.
Right-click Start, and then click Properties.
On the Start Menu tab, click Customize.
In the Customize Start Menu dialog box, scroll down to System Administrative Tools, and then select Display on the All Programs menu and the Start menu. Click OK.
Shortcuts for snap-ins installed by Remote Server Administration Tools (including ADSI Edit) for Windows 7 are added to the Administrative Tools list on the Start menu.