Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee
Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Sunday, April 19, 2020

How to Install CentOS Linux 8 Minimal on Virtual Box | Install CentOS Li...

April 19, 2020
How to Install CentOS Linux 8 Minimal on Virtual Box | Install CentOS Li...

Monday, October 28, 2019

How to Reset/Recover/Forget Root Password in CentOS/RHEL/Fedora and VM/KVM

October 28, 2019
How to Reset/Recover/Forget Root Password in CentOS/RHEL/Fedora and VM/KVM

Note : Take Backup of your data before you proceed

Method 1 - (CentOS/RHEL/Fedora)

Step1 :- Restart the Machine

Step2 :- Press "e" from keyboard at time when kernel versions presented Press "e" again

Step3 :- Search for "rd.break" line (last line of Linux16) or write next to rw file (rw init=/sysroot/bin/sh)

Step4 :- Press Ctrl+X(control+x) to start on single user mode

Step5 :- Type at command line "mount -o remount, rw /sysimage"
chroot /sysimage or  chroot /sysroot
passwd root      or  passwd
load_policy -i   or touch /.autorelabel
restorecon /etc/shadow to restore the SELinux settings for the given file
reboot   or exit

Method 2 - (CentOS/RHEL/Fedora)

Step1 :- Boot/Restart the Virtual Machine or Server

Step2 :- Then Select Troubleshooting see below screenshot

Step3 :- Then Select Rescue a CentOS system and hit Enter

Step4 :- Then type 1 and hit enter a couple of times until you get the command prompt (shell).

Step5 :- Then type in command prompt one by one
Chroot /mnt/sysimage
Passwd
Rm -f /.autorelabel
Exit
Exit

Step6 :- After Reboot Login with New Password

Method 3 - (CentOS/RHEL/Fedora)

Step1 :- Boot/Restart the Virtual Machine or Server

Step2 :- Interrupt while booting at GRUB Stage with any arrow or space bar from keyboard

Step3 :- Type "e" to edit kernel argument, 'ESC' is used for Cancel or to goback

Step4 :- Then type 1 after rhgb quiet line hit enter to boot

Step5 :- Press "b" to boot process then type "runlevel" in command prompt 1S is single user mode

Step6 :- Type New Password and Again Same Password

Step7 :- Reboot it

Tuesday, October 22, 2019

How to Install and Use Linux Malware Detect (LMD) with ClamAV as Antivirus Engine on Fedora Server

October 22, 2019
How to Install and Use Linux Malware Detect (LMD) with ClamAV as Antivirus Engine on Fedora Server
 





Installing LMD on RHEL/CentOS 7.0 and Fedora 22-24

LMD is not available from online repositories, but is distributed as a tarball from the project’s web site. The tarball containing the source code of the latest version is always available at the following link, where it can be downloaded with:

Step 1 :-  wget https://www.rfxn.com/downloads/maldetect-current.tar.gz

Step 2 :-  tar -xvf maldetect-current.tar.gz

Step 3 :-  ls -l | grep maldetect

Step 4 :-   ./install.sh

Configuring Linux Malware Detect

The configuration of LMD is handled through /usr/local/maldetect/conf.maldet and all options are well commented to make configuration a rather easy task. In case you get stuck, you can also refer to /usr/local/src/maldetect-1.4.2/README for further instructions.

In the configuration file you will find the following sections, enclosed inside square brackets:

EMAIL ALERTS
QUARANTINE OPTIONS
SCAN OPTIONS
STATISTICAL ANALYSIS
MONITORING OPTIONS

Important:-
Please note that quar_clean and quar_susp require that quar_hits be enabled (=1).

Summing up, the lines with these variables should look as follows in /usr/local/maldetect/conf.maldet:

Installing ClamAV on RHEL/CentOS 7.0 and Fedora 22-25

Step 4:- Create the repo file /etc/yum.repos.d/dag.repo:

Step 5:- yum update && yum install clamd


Step 9:-  Testing Linux Malware Detect
wget http://www.eicar.org/download/eicar.com
# wget http://www.eicar.org/download/eicar.com.txt
# wget http://www.eicar.org/download/eicar_com.zip
# wget http://www.eicar.org/download/eicarcom2.zip

Step 10:- maldet --scan-all /var/www/

Step 11:- maldet --scan-all /var/www/*.zip

Step 12:- maldet --report xxxxx-xxxx.xxxx      ---  (view the report )

Step 13:- ls –l        ---  (check the quarantine folder )

Step 14:- rm -rf /usr/local/maldetect/quarantine/*     ---  (remove all quarantined files)

Step 15:- maldet --clean SCANID