Friday, March 11, 2011

How to reset your forgotten password in LInux ...???

1) boot off your linux live CD/ Flash drive

2) ascertain which partition linux is installed on your hard disk
[use fdisk -l command]

3) mount the partition on the hard drive that contains the linux system files
[
sudo mount partition_being_mounted Local_mount_point
ex:- sudo mount /dev/sda2 /mnt

]

4) vi /mnt/etc/passwd and remove the x from a particular user and save /etc/passwd file

ex:- if a user renoy has the entry as follows in /etc/passwd
renoy:x:1002:1002:renoy,,,:/home/renoy:/bin/bash

change it to as follows
renoy::1002:1002:renoy,,,:/home/renoy:/bin/bash


5) reboot and login to your newly unlocked linux installation and set new password

6) Re-shadow your new password for safe keeping

sudo shadowconfig off
sudo shadowconfig on

7) verify that you are able to login with the new password


NB:- tested on ubuntu 10.04

Wednesday, March 9, 2011

How to change the background image of grub2 ?

1) sudo apt-get install grub2-splashimages
the background images will be stored in /usr/share/images/grub directory

2) gksudo gedit /etc/grub.d/05_debian_theme
find the entry named WALLPAPER and change accordingly as follows:-

WALLPAPER="/usr/share/images/grub/ubuntu.png"
COLOR_NORMAL="white/black"
COLOR_HIGHLIGHT="red/white"

3) give the command:- sudo update-grub & reboot the machine

NB:- tested on ubuntu 10.04

Tuesday, March 8, 2011

How to make XP as the default O.S with grub2 ?

Soln:-

1) give the following command :- grep -i XP /boot/grub/grub.cfg

you will get the o/p in the following lines

menuentry "Windows XP Professional x64 Edition (on /dev/sda2)"

2) now give the command sudo gedit "Windows XP Professional x64 Edition (on /dev/sda2)" and change the line
GRUB_DEFAULT= 0 to
GRUB_DEFAULT="Windows XP Professional x64 Edition (on /dev/sda2)"

3) give the command :- sudo update-grub & reboot

Friday, March 4, 2011

Wednesday, March 2, 2011

sample /etc/motd

WARNING:- YOU MUST HAVE PRIOR AUTHORIZATION TO ACCESS THIS SYSTEM. ALL
CONNECTIONS ARE LOGGED AND MONITORED. BY CONNECTING TO THIS SYSTEM YOU FULLY
CONSENT TO ALL MONITORING. UN-AUTHORIZED ACCESS OR USE WILL BE PROSECUTED TO
THE FULL EXTENT OF LAW. YOU HAVE BEEN WARNED