Low Level Format ,UMask and Some Important File Settings:
Low Level Format :
2.INITRDThe command ‘shred’ is used for low level format 25 times, we can’t recover files after this
#shred /dev/hda
UMask:-
User Mask
Default value for root = 0022
Default value for users = 0002
When we create any new file. The default value will be 666. in this case Umask means 666-002 = 664 for normal user and for the root the default value will be 666-022=644
The default value for a directory is 777. in this case umask means that whenever we create new directory, the default valkue for normal user 777-002 = 775 and for root, the default value 777-022 = 755
Some Important File Settings:
- GRUB.CONF
GRUB stands for GRand Unified Bootloader. It is the default boot loader used by Red Hat Linux…… Grub.conf file found in /boot/grub/grub.conf
If remove grub file :--------- boot from cd and go to linux rescue.
grub>find /grub/stage1
(hd0,1)
grub> root (hd0,1)
grub>find /etc/passwd
(hd0,2)
grub> kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/hda3
grub>initrd /initrd-2.6.18-8.el5.img
grub>boot
after booting system open grum file and enter grub entery…
#vi /boot/grub/grub.conf
Default = 0
Timeout = 5
Splash image=(hd0,0)/grub/splash.xpm.gz
Hidden menu
Title Redhat Linux
Root (hd0,0)
Kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
Initrd /initrd-2.6.18-8.el5.img
If remove initrd file how to recover
Boot form cd and goto linux rescue and write this command..
#mkinitrd -v /boot/initrd-$(uname -r).img $(uname -r)
#exit
#exit
3. INITTAB
3. INITTAB
Run level setting are done in inittab file. Inittab found in
/etc/inittab
#vi /etc/inittab
id:5:initdefault:
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
ca::ctrlaltdel:/sbin/shutdown –t3 –r now *
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
X:5:respawn:/etc/x11/prefdm –nodaemon
Setting Grub Password
Setting Grub Password
Two method are used to set grub password
Method I:
#vi /boot/grub/grub.conf
Below
Hiddenmenu
Password = redhat
This password is not in encrypted form.
Method II: Encrypted form
#grub
grub>md5crypt
enter password : * * * *
after enter now you see password encryptions format
like this ghs84hD1hd3gs42Kj4$3s
now copy this encryption formatand open
new terminal and open grub file
#vim /boot/grub/brub.conf
paste in this cncryptions here two lines
password --md5crypt ghs84hD1hd3gs42Kj4$3s
title Red Hat linux
password --md5crypt ghs84hD1hd3gs42Kj4$3s
root (hd0,0)
:wq
Thanks,
No comments:
Post a Comment