Sunday, 3 December 2017

How to Install SeedDMS on RHEL/Centos 7



SeedDMS is a very useful open source document management system. Its features are quite powerful, easy to use, but unfortunately lack of documentation. To install SeedDMS we need to install first a couple of packages in our RHEL/Centos 7.

Friday, 1 December 2017

How to create new SVN repository



SVN repository creation is a simple task. The svnadmin utility that comes with subversion provides a subcommand svnadmin create for creating the new SVN repository.

Environment:

 The Subversion repository is already configured and the SVNParentPath is /var/www/html/

Create a Repository:

[root@ linuxcnf ~]# cd /var/www/html/
[root@ linuxcnf html]# mkdir testrepo
[root@ linuxcnf html]# svnadmin create testrepo
[root@ linuxcnf html]# chown apache.apache -R testrepo

Now you can access the new created repository using server URL.

Saturday, 25 November 2017

netstat Command not found on CentOS 7 / RHEL 7



netstat is a command line utility to check the network connection, configuration and activity on a Linux machines.

Friday, 20 October 2017

How to check whether port is listening or not



If you’re troubleshooting a service that you know is running normally the next step is to ensure its listening on the correct network port.

How to check port is open on remote server



You can check if a port is open in your network by issuing the telnet command. If it is open, you will see a blank screen or connected after issuing the command:

Thursday, 5 October 2017

How to Compress an Entire Directory or a Single File in Linux



Compress an entire directory or a single file on Linux. It will also compress every other directory inside a directory recursively.

How to Extract Tar Files to Specific or Different Directory in Linux



Extract a tar archive to a different directory using tar command on a Linux. We can do this using the following command where we want to the files to reside.

Sunday, 10 September 2017

File/Directory Compression and Archiving with Zip



Compressed files use less disk space and download faster than large, uncompressed files. You can compress Linux files with one of the popular open-source compression tool Zip.

Friday, 8 September 2017

How to Restrict PHP Information Leakage



By Default PHP installation exposes to the world that PHP is installed on the server. Need to modify the php.ini and set the expose_php variable to Off. For Centos/RHEL, the file is /etc/php.ini. This will remove the X-Powered-By line and PHP version.

Tuesday, 5 September 2017

How to Setup Linux SSH Login Banner on Centos/RHEL 7



Most of the system administrator whenever configure Linux Servers always use login banner for sending a message before authentication. The banner contains some security warning information or general information. This option is only available for protocol version 2. By default, no banner is configured in SSH.

Sunday, 3 September 2017

How to configure SFTP Server on Centos/RHEL - Multiple users



SSH File Transfer Protocol (SFTP) is application protocol designed to allow easily transfer files between computers. Many users prefer to use SFTP. SFTP provides file access, transfer, and management tools that resemble FTP through a secure SSH connection. However, SFTP is not merely FTP over SSH. Instead, it is an entirely separate protocol. 

Saturday, 2 September 2017

How to Set Password Policy in /etc/login.defs on Centos/RHEL



The password aging controls and password length are defined in /etc/login.defs file. The password policy required to defining the number of days a password is valid, minimum length of a password, the strength of a password, and number of warning days before the password expires. To apply password policy, edit /etc/login.defs file and set PASS values.

Monday, 28 August 2017

How to set umask for a System User in RHEL/Centos



When user created a file or directory under in Centos/RHEL, the file or directory created with a default set of permissions. By default the file permission has 644 a directory created with 755 permissions, grants read, write, and execute permission to the owner and read and execute permission to groups and others.

How to set Daemon umask in RHEL/Centos



When a user creates a file or a directory under Linux, there is a set of default permission which is applied on those files and directory. These predefined permissions are assigned as per the value of default umask.

Saturday, 26 August 2017

How to disable Trace/Track in Apache/httpd



The TRACE method is enabled by default in an apache/httpd installation. This could expose server to certain Cross-Site Scripting attacks.  There are two methods directive and rewrite rule to disable the TRACE method. In this tutorial, we will show how to check for TRACE support on Apache2/httpd server using curl, and then disable if it is enabled.

Sunday, 20 August 2017

How to Disable Apache/httpd version/ ServerSignature



We can hide Apche/httpd to show versions and other information by adding two parameters ServerSignature and ServerTokens. By setting this ServerSignature off and ServerTokens Prod we restrict to display Apache/httpd version for clients.

Thursday, 17 August 2017

How to add Hibernate option to the Start Menu in Windows 10



By default the Hibernate option is not enabled in start menu power option. See the below screenshot:

How to: Enable and Disable the User accounts in Linux/Unix



There are different methods of locking a user account in Linux. This article explains how to lock or disable a user account by locking their passwords in Linux.

Wednesday, 16 August 2017

How to fix Authentication refused: bad ownership or modes for directory



While setup public key authentication if getting this error in /var/log/secure logs, the problem with permission on directory and files.

How to Setup NIC bonding in RHEL7/Centos7



NIC Bonding enables two or more network interfaces to act as one interface, to provide higher data rates and as well as link failover. Linux kernel features that allows aggregating multiple interfaces. This is a great way of achieving redundancy to a server. If one physical NIC is down or unplugged, it will automatically move resource to other NIC card.
In Linux network configuration files stored in /etc/sysconfig/network-scripts/ directory.

Tuesday, 15 August 2017

Secure boot loader (grub menu) with password in Centos 7/RHEL 7




Secure boot loader (grub menu) with password in Centos 7/RHEL 7

Below is the GRUB menu where we are planning to put the password so that no one logs in to single user mode without permission



As you can see by default anyone can press "e" and edit the grub menu to enter single user mode

Login as root and run the below command. When prompted, provide the grub password to be used
# grub-md5-crypt
Password:
Retype password:
$1$KYWqk1$cyrEcj8xXtctko70sSowx.
Next edit the GRUB configuration file /etc/grub.conf and add a new entry as shown below after timeout parameter in the main section.
password --md5 <password-hash>
Replace <password-hash> with the value returned by grub-md5-crypt above

# less /etc/grub.conf
default=0
timeout=5
password --md5 $1$KYWqk1$cyrEcj8xXtctko70sSowx.
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
Next time the system boots, the GRUB menu does not allow access to the editor or command interface without first pressing p followed by the GRUB password.

Reboot and verify the changes



So now it does asks for the password we had set.

Let me know your success and failures.

How to: - Fix PHPMyAdmin 403 Forbidden Error



When we install phpmyadmin using yum in RHEL7/Centos7. By default phpmyadmin installed under /usr/share/phpmyadmin and the apache configuration file is located in /etc/httpd/conf.d/phpmyadmin.conf.

How to: Disable the HTTP TRACE Method



Most vulnerability scanners will complain about TRACE method being enabled on the web server tested.

Monday, 14 August 2017

RHEL 7.3 Could not detect disk array partition while installation



Installing Red Hat Enterprise Linux 7.3 on HP Dynamic Smart Array B120I SATA RAID.

How to disable directory browsing in Apache/httpd?



How can we disable building of directory index in httpd? One of the most important settings in Apache to secure Apache web server is to disable directory browsing. To prevent the server from showing a listing of the existing files in case there is no index in one folder.
Usually Apache comes with this feature enabled but it’s always a good idea to get it disabled unless you really need it.

Saturday, 13 May 2017

LVM Resize – How to Increase an LVM Partition



In this tutorial we will work through extending logical volume /opt from 9.8 GB to appr.15 GB. We have added new hard disk of 10 GB.