Archive for February, 2009

How to check if LDAPS is really running on a server?

Monday, February 9th, 2009

Sometimes this is necessary since the server “appears” to be running (netstat -an|grep 636 returns port in LISTEN state, but the daemon behind is not operative because (for instance) the certificate has not been installed. If this is the case, grab an openssl client and issue the following command: ...

Assigning privileges to a user on MySQL DB

Tuesday, February 3rd, 2009

Quick and dirty commands from commandline: mysql -u <user> -p<password> mysql> CREATE DATABASE wordpress; mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY 'dbpassword'; ...

Scripting elegance: reading filenames containing spaces

Tuesday, February 3rd, 2009

You might need to do something with a list of files contained in a file… and maybe these file names include spaces, therefore using a standard for i in `cat filename` do echo $i done does not work ...