PyCharm: Python IDE for Professional Developers

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘PyCharm: Python IDE for Professional Developers’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/01/Pycharm-Python-IDE.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

2017 Product Development Recap

2017 was a year unlike any other here at cPanel. As we start 2018, I’d like to share some of the highs and lows of 2017 with you.

cPanel; The Company.

We continued our tradition of bringing customers to our development teams, having two such visits during 2017. Representatives from companies as diverse as InMotion Hosting, Maui Global Communications Corporations, VexxHost, and Host4Yourself were just some of the customers that we brought to cPanel HQ. Among the topics discussed were EasyApache 4, needed improvements to the in-product backup system, and streamlining system deployment.

Late in the year, the company marked a small milestone in its life: our office building now has a sign. Everyone at cPanel, Inc. is proud to work there. Now we have a sign informing the world of where we are proud to work!

We also added a ton more resources for our clients. Partners gained early access to our updated Brand Guidelines. At the 2017 cPanel Conference, our Wednesday Keynote focused on the importance of Transparent Reporting. We announced our very first Transparency Report and Law Enforcement Guide. These reports and guidelines help our customers understand how cPanel responds to requests for information from any governing body, and what they can expect from cPanel, Inc. in the future.

At WHD.global (now CloudFest) our Marketing Team launched a brand new co-marketing initiative with our Partners. The program helps customers with marketing collateral and materials designed to improve customer acquisition and education. Several customers are nearing the launch phase. We aim to make the program widely available sometime in 2018.

In September an estimated 27 to 33 trillion gallons of water fell across Texas and Louisiana, courtesy of Hurricane Harvey. Everyone felt the devastation caused by the event, even if not personally affected. After first taking care of our employees, friends, and family, we came together to rally for our town. We donated countless hours of physical labor, a ton of resources, and together raised $21,850.16 for the Houston Food Bank.

cPanel & WHM; The product

We started the year with version 62, the first release according to our new LTS plan. Tons of new features and feature improvements came with that version, becoming one of our most widely adopted versions of all time. Our new LTS model allowed us to streamline delivery of product changes (both enhancements and defects).

March brought the end of support for CentOS 5, RedHat 5, and CloudLinux 5 and we realized some of our customers were in a sticky situation. Moving away from an older Red Hat based operating system to a newer version is not easy. The number of servers still using this older version was high, much higher than at a similar time of ending support for CentOS 4. We decided to extend product support for two more security releases, bringing support to an end in October. We are pleased with the results. The share of CentOS 5, and cousins, dropped over 50%. The rate of change was faster than the same period the year prior.

We added ready-to-run server images of cPanel & WHM with version 62. These are the same images we use internally for development and testing. cPanel & WHM Deployers and Integrators use these images in a variety of ways. We are happy to reduce the cost of building and maintaining deployment of new systems with these.

In October we started testing out a potential new license type called cPanel Solo™. The Solo license is intended for customers with simpler needs, who only need a single hosting account on the server. Testing is still in the early phase, ideal for early adopters. If you are interested you can buy a solo license today from the cPanel Store (note: at this time it is not possible to convert an existing server from a non-Solo license to a Solo license, nor vice-versa).

cPanel 2018

We only scratched the surface of what 2017 was, and 2018 is shaping up to be an equally exciting one! Keep a close eye on this blog to see all the latest.

How to Get Domain and IP Address Information Using WHOIS Command

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to Get Domain and IP Address Information Using WHOIS Command’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/01/Whois-Command-Examples.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

How to View Configuration Files Without Comments in Linux

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to View Configuration Files Without Comments in Linux’,media: ‘https://www.tecmint.com/wp-content/uploads/2017/12/View-Files-Without-Comments-in-Linux.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

How to Send a Message to Logged Users in Linux Terminal

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to Send a Message to Logged Users in Linux Terminal’,media: ‘https://www.tecmint.com/wp-content/uploads/2017/12/Send-Message-to-Linux-Users.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

How to Find All Failed SSH login Attempts in Linux

Each attempt to login to SSH server is tracked and recorded into a log file by the rsyslog daemon in Linux. The most basic mechanism to list all failed SSH logins attempts in Linux is a combination of displaying and filtering the log files with the help of cat command or grep command.

In order to display a list of the failed SSH logins in Linux, issue some of the commands presented in this guide. Make sure that these commands are executed with root privileges.

The most simple command to list all failed SSH logins is the one shown below.

# grep "Failed password" /var/log/auth.log
List All Failed SSH Login Attempts

List All Failed SSH Login Attempts

The same result can also be achieved by issuing the cat command.

# cat /var/log/auth.log | grep "Failed password"


In order to display extra information about the failed SSH logins, issue the command as shown in the below example.

# egrep "Failed|Failure" /var/log/auth.log
Find Failed SSH Logins

Find Failed SSH Logins

In CentOS or RHEL, the failed SSH sessions are recorded in /var/log/secure file. Issue the above command against this log file to identify failed SSH logins.

# egrep "Failed|Failure" /var/log/secure
Find Failed SSH Logins in CentOS

Find Failed SSH Logins in CentOS

A slightly modified version of the above command to display failed SSH logins in CentOS or RHEL is as follows.

# grep "Failed" /var/log/secure
# grep "authentication failure" /var/log/secure
Find SSH Authentication Failure Logins

Find SSH Authentication Failure Logins

To display a list of all IP addresses that tried and failed to log in to the SSH server alongside the number of failed attempts of each IP address, issue the below command.

# grep "Failed password" /var/log/auth.log | awk ‘{print $11}’ | uniq -c | sort -nr
Find IP Addresses of SSH Failed Logins

Find IP Addresses of SSH Failed Logins

On newer Linux distributions you can query the runtime log file maintained by Systemd daemon via journalctl command. In order to display all failed SSH login attempts you should pipe the result via grep filter, as illustrated in the below command examples.

# journalctl _SYSTEMD_UNIT=ssh.service | egrep "Failed|Failure"
# journalctl _SYSTEMD_UNIT=sshd.service | egrep "Failed|Failure" #In RHEL, CentOS 
Find Real Time Failed SSH Logins

Find Real Time Failed SSH Logins

In CentOS or RHEL, replace the SSH daemon unit with sshd.service, as shown in the below command examples.

# journalctl _SYSTEMD_UNIT=sshd.service | grep "failure"
# journalctl _SYSTEMD_UNIT=sshd.service | grep "Failed"

After you’ve identified the IP addresses that frequently hit your SSH server in order to log in to the system with suspicious user accounts or invalid user accounts, you should update your system firewall rules to block the failed SSH attempts IP addresses or use a specialized software, such as fail2ban to manage these attacks.

How to Clear BASH Command Line History in Linux

The bash history keeps a record of all commands executed by a user on the Linux command line. This allows you to easily run previously executed commands by using the “up arrow” or “down arrow” keys to scroll through the command history file.

In this article, we will show you two simple ways to clear your command-line history on a Linux system.

The major reason for removing command-line history from the Linux terminal is to prevent another user, who could be using the same account.

For instance if you have typed a command that contained a password in plain-text and you don’t want another system user or an attacker to see this password, you need to delete or clear the history file.


Take a look at the command below, here the user aaronkilik has typed the database server password on the command line.

$ sudo mysql -u root [email protected]!#@%$lab

If you look into th bash history file towards the end, you will see the password typed above in there.

$ history
Check Last Executed Commands

Check Last Executed Commands

The bash_history file is normally located in a user’s home directory /home/username/.bash_history.

$ ls -l /home/aaronkilik/.bash_history

To remove a single line from the history file, use the -d option. For example, if you want to clear a command where you entered clear-text password as in the scenario above, find the line number in the history file and run this command.

$ history -d 2038

To delete or clear all the entries from bash history, use the history command below with the -c option.

$ history -c

Alternatively, you can use the command below to delete history of all last executed commands permanently in the file.

$ cat /dev/null > ~/.bash_history 

Note: A normal user can only view his/her own command history, but the root user can view the command history of all other users on the system.

You can learn more about the bash history file and useful history commands here: The Power of Linux “History Command” in Bash Shell.

Always remember that all commands you run are recorded in a history file, so do not type plain-text passwords on the command line. If you have questions or thoughts to share with us, make use of the feedback form below.

How to Disable SSH Root Login in Linux

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to Disable SSH Root Login in Linux’,media: ‘https://www.tecmint.com/wp-content/uploads/2017/12/Disable-SSH-Root-Login-in-Linux.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

How to Create a Password Protected ZIP File in Linux

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘How to Create a Password Protected ZIP File in Linux’,media: ‘https://www.tecmint.com/wp-content/uploads/2017/12/Create-Password-Zip-File-in-Linux.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

How to Change Default MySQL/MariaDB Port in Linux

In this guide we’ll learn how to change the default port that MySQL/MariaDB database binds in CentOS 7 and Debian-based Linux distributions. The default port that MySQL database server is running under Linux and Unix is 3306/TCP.

In order to change the default MySQL/MariaDB database port in Linux, open MySQL server configuration file for editing by issuing the below command.

# vi /etc/my.cnf.d/server.cnf [On CentOS/RHEL]
# vi /etc/mysql/mariadb.conf.d/50-server.cnf [On Debian/Ubuntu] 

Search for the line stat starts with [mysqld] and place the following port directive under [mysqld] statement, as shown in the below file excerpts. Replace the port variable accordingly.

[mysqld] port = 12345
Change MySQL Port on CentOS and Ubuntu

Change MySQL Port on CentOS and Ubuntu

After you’ve added the new MySQL/MariaDB port, save and close the configuration file and install the following package under CentOS 7 in order to apply the required SELinux rules to allow the database to bind on the new port.

# yum install policycoreutils-python


Next, add the below SELinux rule to bind MySQL socket on the new port and restart the database daemon to apply changes, by issuing the following commands. Again, replace MySQL port variable to match your own port number.

--------------- On CentOS/RHEL --------------- # semanage port -a -t mysqld_port_t -p tcp 12345
# systemctl restart mariadb
--------------- On Debian/Ubuntu ---------------
# systemctl restart mysql [On Debian/Ubuntu] 

In order to verify if the port configuration for MySQL/MariaDB database server has been successfully applied, issue netstat or ss command and filter the results via grep command in order to easily identify the new MySQL port.

# ss -tlpn | grep mysql
# netstat -tlpn | grep mysql
Verify MySQL Port

Verify MySQL Port

You can also display the new MySQL port by logging in to MySQL database with root account and issue the below command. However, be aware that all connections to MySQL on localhost are made via MySQL unix domain socket, not via the TCP socket. But the TCP port number must be explicitly specified in case of command line remote connections to MySQL database using the -P flag.

# mysql -h localhost -u root -p -P 12345
MariaDB [(none)]> show variables like 'port';
Check MySQL Port Variable

Check MySQL Port Variable

In case of remote connection to MySQL database, the root user must be explicitly configured to allow incoming connections form all networks or just an IP address, by issuing the below command in MySQL console:

# mysql -u root -p
MariaDB [(none)]> grant all privileges on *.* to 'root'@'192.168.1.159' identified by 'strongpass';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit

Remotely log in to MySQL server via a command line client on the new port by issuing the below command.

# mysql -h 192.168.1.159 -P 12345 -u root -p 
Remote Login to MySQL on Port

Remote Login to MySQL on Port

Finally, once you’ve changed MySQL/MariaDB database server port, you need to update your distribution Firewall rules to allow incoming connections to the new TCP port so that remote clients can successfully connect to the database.