Booting into Single User Mode – (Password Recovery)

Many occasions during commissioning of servers we need to reboot especially to freshen hardware re-configurations. (ain’t that still a bitch). Single user mode is there to help. Booting into single user mode At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu. Select CentOS with the version of the kernel…

Checking for email server blacklisting

Trying to understand why mail is not being sent ? [For Sendmail] If your  tail -f /var/log/maillog logs are showing something like this: Aug 30 22:43:06 netman sendmail[8100]: starting daemon (8.14.4): SMTP+queueing@01:00:00 Aug 30 22:43:06 netman sm-msp-queue[8109]: starting daemon (8.14.4): queueing@01:00:00 Aug 30 22:43:11 netman sendmail[8102]: q7SIq1Kk011256: to=<david.saliba@jial.com>, ctladdr=<root@netman.lan> (0/0), delay=2+04:51:10, xdelay=00:00:05, mailer=esmtp, pri=3720580, relay=alt4.jial-smtp-in.l.gogglee.com. [XX.125.142.26],…

Creating a router on a CentOS 6 server

Assuming you want to NAT the network on eth1 and route the traffic to eth0 this is the spell: Create the forwarding rule: /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE and then enable IP forwarding  echo “1” > /proc/sys/net/ipv4/ip_forward OR sysctl -w net.ipv4.ip_forward=1   Permanent setting using /etc/sysctl.conf If we want to make…

Windows time stamping in batch files

Creating a time-stamp  in windows can be usful for the automated backups we all SHOULD be doing 🙂   pkzip c:\<source>\*.* c:\<target>\TempZip.zip ren C:\<target>\TempZip.Zip c:\<target>\TempZip_%date:~-4,4%%date:~-7,2%%date:~-10,2%.zip   Or simply to create a directory for copying open files (Lawrence 🙂 ) set backdir=%date:~-4,4%%date:~-7,2%%date:~-10,2% mkdir %backdir% cd %backdir% etc..    

Allow remote SQL connection to Mysql from any host

Allowing the login of a user from any host in Mysql is simple: mysql> select host, user from mysql.user; +—————+——+ | host | user | +—————+——+ | 127.0.0.1 | root | | localhost | root | | minimal01.lan | root | +—————+——+ 3 rows in set (0.00 sec) mysql> update mysql.user set host=’%’ where host=’127.0.0.1′;…

CENTOS 6 Minimal does not have the Network interfaces up by default

So test drove CentOS  6 Minimum install .. Only real hiccup till now is : TUV ( the upstream vendor) aka RHEL decided to disable the network interfaces by default. WTF to that. A glance at the FAQ  will show the solution : Here’s my version for multiple interfaces.   # cd /etc/sysconfig/network-scripts/   # sed…

Enable grub menu UBUNTU

Enable grub menu: edit the /etc/default/grub  file and change the GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true to GRUB_HIDDEN_TIMEOUT=10 GRUB_HIDDEN_TIMEOUT_QUIET=false Save and call: sudo update-grub from a terminal, and reboot.