Generate random passwords using Perl

If you have a server where you have to generate new passwords daily, the following script can automate the process: #!/usr/bin/perl my @alphanumeric = (‘a’..’z’, ‘A’..’Z’, 0..9); my $randpassword = join ”, map $alphanumeric[rand @alphanumeric], 0..8; print “$passwordgen\n” Run it with ./passwordgen.pl and it will generate random strings of charaters and numerals, 8 characters long:… Read More »

Scan for bad sectors in Linux

Bad sectors are the bruises of your harddisk. To check if a harddisk is in good shape, we can use its SMART capabilities: smartctl -t long /dev/hda To check for bad sectors, use badblocks -sv /dev/hda

Touchpad scroll with two fingers tweak

Apple laptops allow the user to perform scrolls by using two fingers on the touchpad. This can easily happen in Linux by adding the following to your InputDevice section from /etc/X11/xorg.conf : Option “VertTwoFingerScroll” “true” Option “HorizTwoFingerScroll” “true”

List EXT3 volume names in Linux

If you have multiple Linux partitions and want to find out the name of a certain one, you can use findfs for the task: $ /sbin/findfs LABEL=/ /dev/hda1 The findfs binary is in the e2fsprogs package.