How to install chrony in Linux

To install Chrony on CentOS, you can use the package manager yum. Here are the steps to install Chrony:

  1. Open a terminal on your CentOS system.
  2. Make sure your system is updated by running the following command:bashCopy codesudo yum update
  3. Install Chrony using the following command:bashCopy codesudo yum install chrony
  4. Once the installation is complete, you can start and enable the Chrony service to ensure it starts automatically on boot:bashCopy codesudo systemctl start chronyd sudo systemctl enable chronyd
  5. Check the status of the Chrony service to ensure it is running:bashCopy codesudo systemctl status chronyd If everything is set up correctly, you should see output indicating that the service is active and running.

Now, Chrony is installed and running on your CentOS system. You can configure Chrony by editing its configuration file located at /etc/chrony.conf. After making any changes to the configuration file, remember to restart the Chrony service:

bashCopy code

sudo systemctl restart chronyd

Make sure to adjust any firewall settings if necessary to allow NTP (Network Time Protocol) traffic if you want your system to synchronize its time with remote NTP servers.

Configure DHCP Failover on CentOS 7

Configuring DHCP (Dynamic Host Configuration Protocol) failover on CentOS 7 typically involves using the ISC DHCP server, which is a widely used DHCP server on Linux systems. DHCP failover ensures high availability and redundancy for DHCP services. Here’s a basic guide on how to set up DHCP failover on CentOS 7 using ISC DHCP:

Prerequisites:

  1. Install ISC DHCP Server: If you haven’t already installed the DHCP server, you can do so with the following command: sudo yum install dhcp

Configuration:

  1. Edit the DHCP Configuration File: Open the DHCP configuration file in a text editor. The default configuration file is usually located at /etc/dhcp/dhcpd.conf.
  2. sudo vi /etc/dhcp/dhcpd.conf
  3. Configure DHCP Server: Add or modify the following lines in the dhcpd.conf file for the primary DHCP server. Replace the placeholders with your network-specific values.plaintextCopy codeauthoritative; subnet <your_subnet> netmask <your_netmask> { range <start_ip_address> <end_ip_address>; option routers <gateway_ip_address>; option domain-name-servers <dns_server_ip>; }
  4. Configure Failover: Add the following lines to enable DHCP failover. Replace the placeholders with appropriate values.plaintextCopy codefailover peer "dhcp-failover" { primary; address <primary_ip>; port 647; peer address <secondary_ip>; peer port 647; max-response-delay 60; max-unacked-updates 10; load balance max seconds 3; }
    • primary_ip: IP address of the primary DHCP server.
    • secondary_ip: IP address of the secondary DHCP server.
  5. Restart DHCP Server: After making the changes, restart the DHCP server for the configuration to take effect.bashCopy codesudo systemctl restart dhcpd

Secondary DHCP Server Configuration:

  1. Follow the same steps as above for configuring the DHCP server on the secondary server.
  2. Make sure to change the primary keyword to secondary in the failover configuration.

Verification:

  1. Check the DHCP server logs for any errors or warnings.bashCopy codesudo journalctl -u dhcpd
  2. Verify that the failover status is as expected.bashCopy codesudo dhcpd -t This command tests the configuration and reports any syntax errors.

Notes:

  • Ensure that both primary and secondary DHCP servers have synchronized configuration files.
  • Adjust the failover settings and subnet parameters according to your network requirements.
  • Regularly monitor DHCP server logs to catch any potential issues early on.

This guide provides a basic configuration for DHCP failover. Depending on your network architecture and requirements, you may need to adjust the configuration accordingly. Always test the failover setup in a controlled environment before deploying it in a production network.

Raspberry Pi OS: New Releases

Raspberry Pi OS, formerly known as Raspbian, is the official operating system for the Raspberry Pi single-board computers. To get the most current information about recent releases, improvements, and updates, you should check the official Raspberry Pi blog, website, or forums.

Here are general steps to find the latest releases:

  1. Official Raspberry Pi Blog: The Raspberry Pi Foundation maintains an official blog where they share news, updates, and announcements. Check the blog for any recent posts regarding new releases or improvements to Raspberry Pi OS.
  2. Official Raspberry Pi Website: Visit the official Raspberry Pi website and navigate to the “Downloads” or “Software” section. This area typically provides information about the latest version of Raspberry Pi OS and any release notes.
  3. Forums and Community Discussions: Raspberry Pi has an active community, and users often discuss new releases and share their experiences on forums like the Raspberry Pi forums (https://www.raspberrypi.org/forums/). Check relevant threads or start a new one to inquire about the latest releases.
  4. GitHub Repository: The Raspberry Pi OS source code and related projects are hosted on GitHub. The repository may contain release notes and details about recent updates. You can find the repository at: https://github.com/RPi-Distro

By checking these sources, you should be able to find the latest information on Raspberry Pi OS releases, including any new features, improvements, or changes to the operating system. Remember that software development is an ongoing process, so it’s a good idea to stay updated with the latest releases to benefit from new features and enhancements.

Redcore Linux 2401 Released: Latest Features


Introduction: Redcore Linux, a distribution known for its emphasis on security and performance, has recently unveiled its latest release, Redcore Linux Hardened 2401. Packed with new features and improvements, this release is poised to offer users an enhanced computing experience.

Key Features of Redcore Linux Hardened 2401:

  1. Security Enhancements: The “Hardened” in the name is not just for show. Redcore Linux 2401 brings robust security enhancements to the forefront, making it an ideal choice for users who prioritize a secure computing environment. This release incorporates the latest security patches and employs advanced security measures to safeguard user data and privacy.
  2. Updated Kernel: Redcore Linux Hardened 2401 ships with an updated kernel, ensuring compatibility with the latest hardware and providing users with improved system performance and responsiveness. The updated kernel also includes various optimizations for better resource utilization.
  3. Software Updates: The release introduces updated versions of essential software packages, including the desktop environment, system utilities, and productivity tools. Users can expect a more polished and feature-rich experience with the latest software offerings.
  4. User Interface Improvements: Redcore Linux has always been recognized for its user-friendly interface. With version 2401, the desktop environment undergoes enhancements, offering a more intuitive and visually appealing user interface. Customization options are expanded, allowing users to tailor their desktop experience according to their preferences.
  5. Package Management and Repositories: Redcore Linux Hardened 2401 features an optimized package management system, streamlining the process of installing, updating, and removing software. The repositories are curated to provide users with a selection of stable and up-to-date software while maintaining compatibility and security.

How to Upgrade: Redcore Linux users eager to experience the latest improvements can easily upgrade to version 2401. The upgrade process is designed to be user-friendly, ensuring a smooth transition without data loss. Detailed instructions are available on the official Redcore Linux website.

Community Feedback: Community feedback plays a crucial role in the development of any Linux distribution. The Redcore Linux team actively encourages users to share their experiences, report issues, and suggest enhancements. The community forums and communication channels are buzzing with discussions about the latest release, creating a vibrant ecosystem around Redcore Linux.

Conclusion: Redcore Linux Hardened 2401 stands as a testament to the distribution’s commitment to security, performance, and user satisfaction. Whether you are a seasoned Linux user or exploring the world of open-source operating systems, Redcore Linux continues to be a compelling choice. Upgrade now to experience the latest and greatest features this distribution has to offer.

How to reset Windows Server Password

In order to reset Running Windows Server 2012/2016/2019 password you need to follow below mentioned necessary steps:

  • Insert Windows Server USB/ISO/DVD to server
  • DC1 : Reset Administrator’s password
  • You forgot password and logon fail
  • Boot to DVD – Next – Repair your computer – Troubleshoot – Command Prompt, type :
    • X:\Sources D: # Maybe C:
    • D:\Dir # Check folders
    • D:\cd Windows
    • D:\Windows\cd System32
    • D:\Windows\System32\ ren utilman.exe utilman.exe.old
    • D:\Windows\System32\ copy cmd.exe utilman.exe
    • D:\Windows\System32\ Shutdown -r -t 0 # Restart
    • Click ‘Ease of access’
    • C:\Windows\System32\ net user Administrator abc@123 # Set new password is abc@123
    • Logon using new password === OK

How to Configure kiosk on Ubuntu 14.04 and Chrome

Prerequisites

Step 1: Install Ubuntu Server with LTE

Step 2: Install apache2 on Ubuntu

Step 3: Set user login without password authentication

# vim /etc/sudoers
%sudo ALL=(ALL) NOPASSWD: ALL

Step 4: Install Packages

# sudo apt update
# sudo apt install --no-install-recommends xorg openbox google-chrome-stable pulseaudio

Step 5: Set user in audio group

# usermod -a -G audio $USER

Step 6: Create a kiosk file

# vim /opt/kiosk.sh

#!/bin/bash

xset -dpms
xset s off
openbox-session &
start-pulseaudio-x11

while true; do
rm -rf ~/.{config,cache}/google-chrome/
google-chrome --kiosk --no-first-run  'http://Website URL'
done

Step 7: Set execute permission

# chmod +x /opt/kiosk.sh

Step 8: Set Configurations

# vim /etc/init/kiosk.conf

start on (filesystem and stopped udevtrigger)
stop on runlevel [06]

console output
emits starting-x

respawn

exec sudo -u USERNAME startx /etc/X11/Xsession /opt/kiosk.sh --

Step 9: Start X Server

# dpkg-reconfigure x11-common
After screen appears select "Anybody" and press "OK"

Step 10: Start kiosk service

# cd /etc/init/
# start kiosk

Step 11: Set the service in grub configuration

# vim /etc/default/grub

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Step 12: Update grub by executing command

# update-grub

Step 13: Install lightdm service

# apt-get install lightdm

Step 14: Disable Desktop by lightdm

# echo manual | sudo tee /etc/init/lightdm.override

Step 15: Start lightdm service

# start lightdm

Step 16: Create /etc/lightdm/lightdm.conf File

Create a file /etc/lightdm/lightdm.conf and add the following content:

# vim /etc/lightdm/lightdm.conf
[SeatDefaults]
autologin-user=<YOUR USER>
autologin-user-timeout=0
user-session=ubuntu
greeter-session=unity-greeter

Step 17: Add service in startup script

# vim /etc/init.d/kisok
# service kisok start

4 ways to check size of physical memory in Linux

Introduction

In this article we will see basic commands to check the physical memory on the server under Linux. Many beginners struggle to know their system well in the context of resources such as CPU, Memory, Disks, etc. So I decided to write this small item pointing command to check the RAM on the Linux server. These commands will work in different flavors of Linux like Red Hat, CentOS, Suse, Ubuntu, Fedora, Debian etc.

1) Using free command

This command is mainly used to check the RAM and SWAP on the system. Using a different change, you can change the output byte format. Like -b for bytes, -k for kilobytes, -m for megabytes, and -g for gigabytes.

# free -b
              total        used        free      shared  buff/cache   available
Mem:     3976634368  3096838144   187990016    51572736   691806208   540106752
Swap:    4001361920     8826880  3992535040
# free -k
              total        used        free      shared  buff/cache   available
Mem:        3883432     3024204      183600       50364      675628      527488
Swap:       3907580        8620     3898960
# free -m
              total        used        free      shared  buff/cache   available
Mem:           3792        2953         179          49         659         515
Swap:          3815           8        3807
# free -g
              total        used        free      shared  buff/cache   available
Mem:              3           2           0           0           0           0
Swap:             3           0           3

2) Using /proc/meminfo file

# cat /proc/meminfo |grep Mem
MemTotal:        3883432 kB
MemFree:          183268 kB
MemAvailable:     527276 kB

3) Using top command

# top
top - 12:36:36 up 8 days,  2:58,  2 users,  load average: 0.14, 0.14, 0.08
Tasks: 213 total,   1 running, 212 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.2 us,  0.7 sy,  0.0 ni, 99.0 id,  0.2 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  3883432 total,   182356 free,  3025080 used,   675996 buff/cache
KiB Swap:  3907580 total,  3898960 free,     8620 used.   526608 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                            
 2303 root      20   0 2378464 541076   7692 S   1.0 13.9 417:16.56 OpsCenterDBd   

4) Using vmstat

[root@opscenter ~]# vmstat -s
      3883432 K total memory
      3025552 K used memory
      2439780 K active memory
       870348 K inactive memory
       181812 K free memory
       138712 K buffer memory
       537356 K swap cache
      3907580 K total swap
         8620 K used swap
      3898960 K free swap
      2323674 non-nice user cpu ticks
         2978 nice user cpu ticks
       944914 system cpu ticks
    135133743 idle cpu ticks
       692582 IO-wait cpu ticks
          121 IRQ cpu ticks
        49623 softirq cpu ticks
            0 stolen cpu ticks
      1931906 pages paged in
     23034525 pages paged out
          377 pages swapped in
         2353 pages swapped out
    956323695 interrupts
   2040196891 CPU context switches
   1505191059 boot time
       849343 forks

How to Install locate in Linux

Locate is very useful command to find the location of file/folder in linux.
Install mlocate package

# yum install mlocate

Update database by executing updatedb command

# updatedb

Now, locate any file/folder using “locate” command

# locate httpd

/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.modules.d
/etc/httpd/logs
/etc/httpd/modules
/etc/httpd/run
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/httpd/conf.d/README
/usr/sbin/httpd
/usr/share/httpd
/usr/share/doc/httpd-2.4.6
/usr/share/doc/httpd-tools-2.4.6
/var/cache/httpd
/var/cache/httpd/proxy
/var/log/httpd
/var/log/httpd/access_log
/var/log/httpd/error_log

How to check Database size in Linux

We can check all the sizes of databases through execute a simple query in mysql server

Step 1: Login with mysql server

Login to mysql server by putting the mysql server credentials

# mysql -u username -p
Enter Password: 

Step 2: Execute the Query

Execute the mysql query in mysql server.

mysql> SELECT table_schema "Data Base Name",
    -> sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB",
    -> sum( data_free )/ 1024 / 1024 "Free Space in MB"
    -> FROM information_schema.TABLES
    -> GROUP BY table_schema ;

 +---------------------------------+----------------------+------------------+
 | Data Base Name | Data Base Size in MB | Free Space in MB |
 +---------------------------------+----------------------+------------------+ 
 | about_demo_conf | 0.11203384 | 0.02596664 |
 | appstore | 0.02434349 | 0.00234127 |
 | cacti | 0.95234585 | 0.00552368 |
 | growingfeet | 0.10937500 | 11765.00000000 |
 | information_schema | 0.00781250 | 0.00000000 |
 | lotus_to_mysql | 0.47713852 | 0.00000000 |
 | moderapp_log | 0.00230408 | 0.00000000 |
 | moedeogeventmessen | 0.13060379 | 0.00000000 |
 | mysql | 0.66061878 | 0.00000000 |
 | vsftpd | 0.00310898 | 0.00000000 |
 | what2do | 0.03068542 | 0.00035095 | 
+---------------------------------+----------------------+------------------+

WiFi Router Security breaches

Introduction

Wifi security breaches when the research and development team scanned 32 WiFi router firmware firmware products offered by more than 10 of the most popular home, SMB and enterprise wireless routers in the US, Europe and Asia Manufacturer: Asus, Belkin, Buffalo, Cisco, D-Link, EFM, Huawei, Linksys, Netis and TP-Link.

Severity Level

The firmware of the WiFi router sold by the top vendors included versions of open source components with vulnerabilities specified in the binary scans. The firmware of most models contained security holes “Severity High” and “Severity Middle”. This means that deployed products and firmware updates remain vulnerable to potential security threats.

Results

The entire firmware uses Busybox and Samba by default, as the report shows. More than 60 percent used OpenSSL. Significant security issues arise from OpenSSL. This should prompt vendors to consistently use the latest patches or use the version of the software that contains the fix, the researchers said. Much of the firmware did not use the correct, most recent versions of OSS components available, the study found.