dig check

To check dig for multiple domains [root@localhost ~]# vim digcheck  google.com yahoo.com gmail.com linuxmadeeasy.in puppethub.in youtube.com [root@localhost ~]# dig -f digcheck +noall +answer google.com. 258 IN A 216.58.199.142 yahoo.com. 1459 IN A 98.139.183.24 yahoo.com. 1459 IN A 206.190.36.45 yahoo.com. 1459 IN A 98.138.253.109 gmail.com. 300 IN A 216.58.199.165 linuxmadeeasy.in. 600 IN A 50.63.202.2 puppethub.in. 600 … Continue reading dig check

whois check

-------------------------------To check Expiration date-------------------------- [root@localhost ~]# vim script  #!/bin/bash for domain in `cat /root/domains.txt` do echo $domain >> whois-results.txt whois $domain | egrep -i "expiration date" >> whois-results.txt echo  >> whois-results.txt done [root@localhost ~]# vim /root/domains.txt  linuxmadeeasy.in google.com yahoo.com puppethub.in [root@localhost ~]# sh script  [root@localhost ~]# cat whois-results.txt  linuxmadeeasy.in Expiration Date:13-Apr-2017 10:02:00 UTC google.com   … Continue reading whois check

ping check for multiple hosts

Put the list of ip's in file mohammedrafi@NOC-RAFI:~$ vim ips 10.12.13.14 172.15.48.3 192.168.45.54 48.114.78.227 192.168.0.1 192.168.0.2 192.168.0.5 Write the script and place the path of ip's file mohammedrafi@NOC-RAFI:~$ vim script.sh #!/bin/bash # Program name: pingall.sh date cat /home/mohammedrafi/ips | while read output do ping -c 1 "$output" > /dev/null if [ $? -eq 0 ]; … Continue reading ping check for multiple hosts

Pluggable Authentication Modules (PAM)

Pluggable Authentication Modules (PAM) Programs that grant users access to a system use authentication to verify each other's identity (that is, to establish that a user is who they say they are). Historically, each program had its own way of authenticating users. In Red Hat Enterprise Linux, many programs are configured to use a centralized … Continue reading Pluggable Authentication Modules (PAM)

vsftpd.conf file parameters

[root@server ~]# cat /etc/vsftpd/vsftpd.conf # Example config file /etc/vsftpd/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive … Continue reading vsftpd.conf file parameters

Exit and Exit Status

The exit command terminates a script, just as in a C program. It can also return a value, which is available to the script's parent process. Every command returns an exit status (sometimes referred to as a return status or exit code). A successful command returns a 0, while an unsuccessful one returns a non-zero … Continue reading Exit and Exit Status

Ip address classification

Internet Protocol (IP) addresses are usually of two types: Public and Private. If you have ever wondered to know what is the difference between a public and a private IP address, then you are at the right place. In this post I will try to explain the difference between a public and a private IP … Continue reading Ip address classification

Make Rhel-7 & in Graphical mode and runlevel

How To make rhel-7 as graphical desktop yum grouplist yum groups install "GNOME Desktop" or yum groupinstall "GNOME Desktop" yum groups install "Server with GUI" or yum groupinstall "Server with GUI" systemctl set-default graphical.target systemctl start graphical.target How to change the runlevel in rhel-7 or centos-7 systemctl list-units --type=target systemctl get-default systemctl set-default multi-user.target systemctl … Continue reading Make Rhel-7 & in Graphical mode and runlevel

How do I changing run levels 3 to 5?

Default run level is defined in /etc/inittab file. In order to change Linux runlevel from 3 to 5, you need to modify this file. Please follow the instructions outlined below: 1) Login as root user 2) Open /etc/inittab file using vi text editor or gedit GUI text editor # vi /etc/inittab OR Open terminal command … Continue reading How do I changing run levels 3 to 5?