3 04 2013
Makepasswd
I discovered this handy program while investigating generating password hashes and have written a little script that installs it and xclip and then puts a script in /usr/bin that allows you to type a command to generate a pass and copy it to your clipboard.
The current script is for Debian/Ubuntu.
#!/bin/bash RED='\033[01;31m' RESET='\033[0m' if [ $EUID -ne 0 ] ; then echo -e $RED"This script must be run as root!"$RESET exit 1 fi if [ ! -f /usr/bin/makepasswd ] ; then sudo apt-get -y install makepasswd; fi if [ ! -f /usr/bin/xclip ] ; then sudo apt-get -y install xclip; fi touch /usr/bin/pw; chmod +x /usr/bin/pw; echo -e '#!/bin/bash\n\nmakepasswd --chars=15 | xclip -selection clipboard;\n\necho "Password copied to clipboard!"' > /usr/bin/pw; echo -e $RED"Make password script installed, to use type pw into terminal.\nIt will generate a password and copy it to your clipboard. :)"$RESET
You can install it by doing as root;
wget http://imadinosaur.net/scripts/makepasswd && sh makepasswd
Example usage;
craig@marvin:~$ pw Password copied to clipboard! craig@marvin:~$
MySQL error “configure: error: Cannot find libmysqlclient_r under /usr. Note that the MySQL client library is not bundled anymore!” XenServer to KVM migration.