Saturday, February 19, 2011

System CMOS checksum bad

I got this error message every time I try to boot up my Thinkpad T43, I guess I need a new backup battery for my aged laptop and the links below provides a very clear instructions for me to follow.

http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-52603
http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-52604

This is where I can buy the backup battery from:
http://www.machinaelectronics.com/store/buypart/IBM_Thinkpad_T43/02K6541

Friday, February 18, 2011

How to setup GitHub on Ubuntu 10.10 ?



The following keygen step is very important but not mentioned in the GitHub web sites ...

7. Generating SSH keys(Github needs it):
In the terminal type
>ssh-keygen -t rsa -C "xxxx@yzmail.com"
and just press enter for the next 3 statements.
Now execute the following commands :
ravi@Hackintosh:~$ cd .ssh
ravi@Hackintosh:~/.ssh$ gedit id_rsa.pub
The file will be opened in gedit just COPY all the contents and close it and paste the contents in temporary document for later use.( For more info :http://help.github.com/linux-key-setup/)

Monday, February 7, 2011

HowTo: Recovering Linux Grub Boot Loader Password

http://www.cyberciti.biz/tips/howto-recovering-grub-boot-loader-password.html

How to prevents users from entering single user mode or changing settings at boot time ?

When your system is rebooted, grub presents the boot option menu. From this menu one can easily login into a single user mode without the password which might result into compromise system security.

For example, anyone can access the data or change the settings. However you can setup a password for grub with password option. This option forces grub to ask for a password before making any changes or entering into single user mode. You need to type p followed by password.

#1: Create A Password For Grub

Type grub-md5-crypt command to create password in MD5 format:
# grub-md5-cryptOutput:

Password:
Retype password:
$1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0

Please note that you need to copy and paste the MD5 password ($1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0) to your configuration file. Use mouse to copy the same.

#2 Add MD5 Password To Grub Configuration File

Under Debian GNU/Linux the Grub configuration file is located at /boot/grub/menu.lst. (Red Hat / Fedora user use /boot/grub/grub.conf file)
# vi /boot/grub/menu.lst
Edit file and add a password line as follows:
password --md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0
Here is my sample config file:

default         0
timeout 5
password --md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0
title Debian GNU/Linux, kernel 2.6.13.4-cust-en-smp
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda3 ro
savedefault
boot

Save and close the file.


http://www.cyberciti.biz/tips/how-do-i-secure-grub-boot-loader.html

How to remove a user from a group ?

Removing a user from a group is a bit trickier. Unfortunately, there is no direct command, at least not in Fedora or RHEL, that can do that from command line. At first you need to get a list of groups that your user is a member of:

# id -nG username
group1 group2 group3 ....

Then you need to put all these groups as a comma-separated list to the usermod -G option, except for the group from which you want the user to be removed. So, to remove the user from group2, issue the command:

# usermod -G group1,group3,... username


http://www.g-loaded.eu/2005/11/06/manage-users-from-the-command-line/


Difference between su - and su -- ?

sudo su - gives you super user privlages for that account to make changes to and such.
sudo su -- gives you privialdges for the ENTIRE server... thats why some apps dont work for su - because the changes (like boot or some apps) will affect all users