This article will guide you to install a tool which can convert your HTML pages or HTML output to PDF format. This feature will also be helpful to write a code for generating Pdf’s, if we need to send them to a group of customers or clients and for sending reports instead of HTML (which you can send them via emails in PDF format) that will be a value addition to your software.Wkhtmltopdf FeaturesOpen source and cross platform.Convert any HTML web pages to PDF files using WebKit engine.Options to add headers and footersTable of Content (TOC) generation option.Provides batch mode conversions.Support ... Read More
This article will guide to configure samba server in CentOS 6.x with anonymous & secured samba folders. Samba is an Open Source/Free Software suite that provides seamless access to the file services to SMB/CIFS clients. Unlike other tools samba SMB/CIFS implementations will allow to share folders between Linux servers and Windows clients.InstallationInstall the samba package using this command# yum -y install samba # mkdir /sambaGive folder permission to the samba server# chmod -R 0755 /samba/anonymous/You need to modify the smb.conf file in /etc/samba/smb.confFor security reasons, I am taking the backup of the original file in /etc/samba/smb.conf# cp /etc/samba.smb.conf /etc/samba.smb.conf.oldFor removing ... Read More
Given with the number and the task is to generate the diamond pattern with the given n different layers and display it.ExampleInput: n = 3Output:Approach used in the below program is as follows −Input the number of rowsAnd in this pattern there are ((2 * n) + 1) rowsNumber of spaces from 0 – n is (2 * (n – i))And the number of spaces from n+1 till end are ((i – n) * 2)AlgorithmStart Step 1-> declare a function to print a pattern void print_pattern(int n) declare variables as int i, j Loop For i = 1 i
In this article, we will learn how to configure OpenVPN server on Ubuntu Linux. Yes, we can do it using a VPN (Virtual Private network) which allows you to connect to work place from untrusted networks privately and securely. For instance, If you are in a hotel or a coffee shop and wish to access work environment safely and securedly through a Wi-fi network using a Smartphone or laptopOpenVPN is a full featured and open source secure socket layer (SSL) VPN solution that accommodates wide range of configurations.Installing OpenVPNTo start the installation, we needed an Ubuntu machine with non-root user ... Read More
This article will be helpful if we forget the root password on Centos 7.x or RHEL 7.x. In the previous version of RHEL, we can easily break the root password, as by default SE-Linux is enabled. Also note that, RHEL has brought many special new features.Resting the Root PasswordReboot/Restart the system.Press ‘e‘ at the grub boot menu to edit the default boot menu.This screen looks like this for RHEL 7.x –Press us thr down arrow key to find the line which contains similar to the ‘linux16 …… rhgb quit …..” and replace the ‘rhgb quiet’ words with ‘init=/bin/bash’. Once we ... Read More
In this article, we will learn how to configure and install the most popular open source MTA (Mail Transfer Agent) Postfix, which can be used to route email delivery of the Linux Systems. Based on industry usage and estimates, most of the public mail servers are currently running on Postfix.Installing the Software on LinuxSince, Postfix is a default package in the Ubuntu repositories, we can install it easily by using the ‘apt-get’ command. Before we install the packages, we need to update the system. We can do this by using the below command.Here is a sample demo, I used hanuman.com ... Read More
Given with the input as fraction i.e. a/b and c/d where a, b, c and d can be any integer values other than 0 and the task is to add these two fraction to generate their final sum.Fractions are represented by −a / b, where a is known as numerator and b is known as denominator.a and b can have any numeric values but b can have any numeric value other than 0.Sum of two fractions is represented as a / b + c / d, and the rule for adding the two terms is that their denominator must be ... Read More
In this article, we will learn how to change the host name on CentOS 7.x / RHEL 7.0, by default after installation on CentOS 7 or RHEL the default hostname will be localhost.localdomain. This hostname will be used for various services, unlike the older versions we will try to change the host name by changing /etc/sysconfig/networks or using the host name command to change the hostname and after multiple reboot of server the hostname remains as localhost.localdomain. The procedure for changing the host name in CentOS 7 or RHEL is totally different from the previous versions. we have 3 tools ... Read More
Secure Shell or SSH is a cryptographic (encrypted) network protocol operating at layer 7 of the OSI Model to allow remote login and other network services to operate securely over an unsecured network.OpenSSH is a premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options. This article explains about important tasks to secure your SSH server setup.Use a Strong PasswordA password is a string of characters that people can use ... Read More
lsblk command is used to display a list of information about all available block devices. However, it does not give a list of information about RAM disks. Examples of block devices are hard disk, flash drives, CD-ROM. This article explains about how to find a list of block devices in Linux Machine.To install lsblk for Fedora and CentOS ,use the following command –$ sudo yum install util-linux-ngTo install lsblk for Ubuntu and Linux Mint ,use the following command –$ sudo apt-get install util-linux -yTo find the default list of all blocks, use the following command –$ lsblkThe sample output should be like ... Read More