Archive for December 17th, 2011

Disabling USB ports

If you administrating a small or large workstations running with Linux Desktops and want to disable the USB ports for security so that no one can copy the data via pen drive, try the following steps to disable the USB port(s). Edit the grub.conf and add the following lines(you need to login as root). # vi /boot/grub/grub.conf Then add the following lines on the […]

Clearing dmesg logs

What is dmesg? The main purpose of dmesg is to display kernel messages. dmesg can provide helpful information in case of hardware problems or problems with loading a module into the kernel. In addition, with dmesg, you can determine what hardware is installed on your server. During every boot, Linux checks your hardware and logs […]

Disable the Ctrl-Alt-Delete shutdown keys in Linux

DISABLE CTRL+ALT+DEL KEYS Open /etc/inittab file, enter: # vi /etc/inittab Search for line that read as follows: ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now And remove the line or comment out the above line by putting a hash mark (#) in front of it: # ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now Save the file and exit to shell […]

grub corrupted in linux server

A couple of days back I had faced a problem on one of the Linux Server. I rebooted the server for some task & the server didn’t came up for a long time. When I checked from the console, I found the grub command line screen. I knew that the grub has been corrupted. I […]

Recovering root password in linux (Red Hat)

Introduction: Sometimes a system administrator can come across a situation when he need to perform some administrative tasks on the linux box but unable to do so due to unavailability of root password for any reason. The root password can be recovered by performing the following steps on the linux box. Prerequisites: To perform the […]

Linux Yum Command Examples – Install, Uninstall, Update Packages

Installing, removing, and updating packages is a typical activity on Linux. Most of the Linux distributions provides some kind of package manager utility. For example, apt-get, dpkg, rpm, yum, etc. On some Linux distributions, yum is the default package manager. Yum stands for Yellowdog Updater Modified. This article explains 15 most frequently used yum commands […]

Howto disable the iptables firewall in Linux

Task: Disable / Turn off Linux Firewall (Red hat/CentOS/Fedora Core) Type the following two commands (you must login as the root user): # /etc/init.d/iptables save # /etc/init.d/iptables stop Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core) Type the following command to turn on iptables firewall: # /etc/init.d/iptables start Other Linux distribution If you […]


These are the Iptable rules required for port forwarding to /sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d –dport 8888 -j DNAT –to /sbin/iptables -A FORWARD -p tcp -i eth0 -d –dport 80 -j ACCEPT # iptables -t nat -L Here rdp will forward to port […]

Step-by-step OpenLDAP Installation and Configuration on server side

This tutorial describes how to install and configure an OpenLDAP server and also an OpenLDAP client. Step by Step Installation and Configuration OpenLDAP Server openldap 2.2.13-6.4E System name: Domain name: System IP: Note: Use your domain name and IP instead of xyz. Easy steps for adding users:     1. Create unix user […]

Step-by-step OpenLDAP Installation and Configuration on client side

Step #1. Installation [root@ldapclient ~]#  yum install authconfig Step #2. Run the command [root@ldapclient ~]# authconfig-gtk Step #3. Settings          [*] Use LDAP     [*] Use LDAP Authentication     [Both should be checked]         Click “Next”.         [ ] Use TLS         Server:         Base DN: dc=xyz,dc=com         Click “Ok” to confirm. Note: Use your domain name instead of xyz.