Damn caffeine January 26, 2008
Posted by idimmu in life.Well, I guess I've already broken one of my New Years resolutions although I don't feel too bad about it.
After a long stint of only drinking water in pubs (really bloody annoying) I had a diet coke .. not the end of the world. The spirit behind that resolution wasn't really to completely give up caffeine anyway, but to stop having 8 cups of coffee a day, so I don't feel too bad about it!
Restoring Vista personal folders January 20, 2008
Posted by idimmu in windows.I accidently deleted my Pictures personal folder on my Vista laptop earlier and was stuck trying to recreate it. If I created a new folder and called it Pictures then it would turn in to a file, if I copied an existing folder and then renamed it to Pictures it, once again, would turn in to a file.
The trick to restoring it was to run the following command via the Run prompt in the Start Menu:
shell:Pictures
This then recreated the folder for me.
Apache2 ldap auth on Ubuntu Dapper and Feisty January 15, 2008
Posted by idimmu in linux.As part of our internal office systems upgrade we have a shiny new LDAP server which we like to use as much as possible. One of the things we use it for is Apache user auth, mainly we control SVN with it so people can only commit to the projects they're allowed to but we also use it so secure our system's services from the developers that like to play wannabe sysadmin!
Unfortunately we are running several different flavors of Ubuntu in the office with slightly different Apache2 versions and thus LDAP requirements!
Ubuntu Dapper Drake (Apache 2.0)
AuthType basic
AuthName "BackupPC admin"
AuthLDAPUrl ldap://ldap-server:389/ou=people,dc=domain,dc=com?uid?sub
AuthLDAPGroupAttributeIsDN off
AuthLDAPEnabled on
Require group cn=systems,ou=groups,dc=domain,dc=com
AuthLDAPGroupAttribute memberUid
Ubuntu Feisty Fawn (Apache 2.22)
AuthType Basic
AuthName "SVN Repository"
AuthLDAPUrl ldap://ldap-server:389/ou=people,dc=domain,dc=com?uid?sub
AuthzLDAPAuthoritative On
AuthBasicProvider ldap
AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off
Require ldap-group cn=developers,ou=groups,dc=domain,dc=com
Obviously you have to make sure you have the right LDAP modules enabled for each version of Apache2 but that's all that is required to force Apache2 to authenticate against an LDAP group!
Ubuntu and webcams January 14, 2008
Posted by idimmu in linux.I've had some debugging to do for work for a part of our site that uses webcams but I've been a bit hazey about starting it because the last time I plugged a webcam in to a Linux box, 100 years ago, it was a bit messy. I decided to risk it as I'm too lazy to go home and get my laptop, and .. it .. just .. worked ..
Once again Ubuntu impresses me!
[243052.596000] usb 2-7: new full speed USB device using ohci_hcd and address 3
[243052.804000] usb 2-7: configuration #1 chosen from 1 choice
[243052.972000] Linux video capture interface: v2.00
[243052.988000] quickcam: QuickCam USB camera found (driver version QuickCam USB 0.6.6 $Date: 2006/11/04 08:38:14 $)
[243052.988000] quickcam: Kernel:2.6.22-14-generic bus:2 class:FF subclass:FF vendor:046D product:0870
[243053.016000] quickcam: Sensor HDCS-1020 detected
[243053.024000] quickcam: Registered device: /dev/video0
[243053.024000] usbcore: registered new interface driver quickcam
I feel these office lights are harsh on my skin though :(
Using sed to replace all strings in a file January 14, 2008
Posted by idimmu in linux.As part of our test environment rebuild one of the first things we tackled was moving the databases to the new virtual environment, this means changing the database address in a lot of config files, fortunately sed makes this job really easy!
sed -i s/olddatabase/newdatabase/g *.xml
We're also using CNAMEs now for the addresses to make this change a lot easier next time the database moves hardware :)



