Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

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: lf78A7xv

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Reset the MySQL password



You forgot your MySQL password. No problem, you can recover it easily. Stop the MySQL service with
# /etc/init.d/mysql stop
…and restart it without a password:
# mysqld_safe –skip-grant-tables &
You’ll get an output similar to [1] 5958. Now press Enter and type the following one after the other:
# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD(”NEW-ROOT-PASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql restart

It’s all done now and you should be able to login with the new password.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Popular Posts