Friday 12 February 2010

File Deletion using "Shred"

shred: Delete a file securely, first overwriting it to hide its contents.

It is available on most of Linux distributions including Debian GNU/Linux. To remove file called personalinfo.tar.gz :

$ shred -n 200 -z -u personalinfo.tar.gz


Where,

* -n: Overwrite N (200) times instead of the default (25)
* -z: Add a final overwrite with zeros to hide shreddin
* -u: Truncate and remove file after overwriting

Read the man page of shred(1) for more information. Most of these utilities are not effective (read as useless) only if :

* File system is log-structured or journaled filesystems, such as JFS, ReiserFS, XFS, Ext3 etc
* Your filesystems is RAID-based, compressed filesystem etc
* In addition, file system backups and remote mirrors may contain copies of the file that cannot be removed by these utilities.

Thursday 11 February 2010

Crash - Backup!

grub.conf

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df ro quiet splash
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df ro single
initrd /boot/initrd.img-2.6.31-19-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 42ec6cd1ec6cc0b1
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

/etc/X11/xorg.conf

Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1280x1024"
Horizsync 24.0 - 80.0
Vertrefresh 50.0 - 75.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Gamma 1.0
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

Section "Module"
Load "glx"
Disable "dri2"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
EndSection

Section "ServerFlags"
Option "DontZap" "False"
EndSection

/etc/fstab

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
#

proc /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df / ext4 errors=remount-ro 0 1
# Entry for /dev/sda5 :
UUID=04bbfabb-2bb2-4feb-bbb5-726f7ee4781c /home ext4 defaults 0 2
# Entry for /dev/sda6 :
UUID=d3a3ecd4-7a0c-4ca4-86e9-80b6018f076b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb2 /media/Archives ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/sdb8 /media/Video ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/sdb1 /media/Audio ntfs-3g defaults,locale=en_GB.UTF-8 0 0