# date -d @1221256800 "+%Y-%m-%d %T" 2008-09-13 00:00:00
# date -d "20080913" +%s 1221256800
Posted by Hans-Henry Jakobsen
This post describes how to disable IPv6 on a Redhat (RHEL5) installation. I haven’t had the time to test it on other version of Redhat.
Edit /etc/sysconfig/network and change
NETWORKING_IPV6=no
Edit /etc/modprobe.conf and add these lines
alias net-pf-10 off alias ipv6 off
Stop the ipv6tables service
# service ip6tables stop
Disable the ipv6tables service
# chkconfig ip6tables off
IPv6 will be disabled after the next reboot.
Edit
This also works on RHEL6/CentOS6
Tags: ip6tables, RedHat, rhel5, rhel6
Posted by Hans-Henry Jakobsen
This post describes how to allow users in the wheel group to use the sudo command without being prompted for the root password
%WHEEL ALL=(ALL) NOPASSWD: ALL
# gpasswd -a username wheel
This does also work on Fedora and other Redhat based distributions.
Posted by Hans-Henry Jakobsen
man – an interface to the on-line reference manuals.
man is the system’s manual pager. Each page argument given to man is normally the name of a program, utility or function. The manual page associated with each of these arguments is then found and displayed. A section, if provided, will direct man to look only in that section of the manual. The default action is to search in all of the available sections, following a pre-defined order and to show only the first page found, even if page exists in several sections.
The table below shows the section numbers of the manual followed by the types of pages they contain.
1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard]
Tags: man
Posted by Hans-Henry Jakobsen
By default after a kernel panic Linux just sits there and waits for a user to hit the restart button. That can be a bad thing if it’s a remote server.
To check if its enabled try this:
# cat /proc/sys/kernel/panic 0
The returned 0 is the time the kernel will wait before it reboots. If it is 0 or lower, it won’t reboot by itself.
To set the kernel to reboot do this command
# echo "5" > /proc/sys/kernel/panic
Where 5 is replaced with the number of seconds to wait till reboot after a kernel panic.
To check the time was set right do this:
# cat /proc/sys/kernel/panic 5
To make it more permanent do this:
# echo "kernel.panic=5" >> /etc/sysctl.conf
Adding the following to your kernel parameters in your bootloaders configuration might also help:
panic=5
NOTE: Substitute 5 with the number of seconds to wait till reboot after a kernel panic.
Source: http://gentoo-wiki.com/TIP_Kernel_Panic_Reboot
Posted by Hans-Henry Jakobsen