Another poor sysadmin

Folks remember... every time you code like this,
god kills a kitten
This is the Ginseng Coffee Word Press theme installed on Blogentis.

The greatest of all

Κυριακή, 30 Σεπτέμβριος 2007, 04:56 by Giannis Papaioannou

Sometimes I have to spend a couple of minutes arguing with ignorants, who believe they're very skilled programmers.

Last time it was about programming languages. Someone (another too young enthusiastic programmer) was pretty much sure that c++ was the greatest language of all. Well, I doubt that he has written anything appreciable in c++, currently he's just learning it. To prove his point, he dared me to tell him what is better than c++.

I was unable to answer that. Of course, that proved nothing, my inability to point to another language does not mean there isn't anything better. I have studied some languages, probably more than he has. But programming isn't in my every day activities, I just acknowledge that I'm not the right man to answer that. I've also studied c++ and I found it a powerful but ugly language, with many inconsistencies in the way its syntax was designed. I also know that languages like c# and java were created as clean oo alternatives to c++, or as the way c++ should be in the first place. But are they better? Are they more or equally powerful?

What criteria should be used in this case study? Does anyone have an opinion on what is better than c++?

Keeping notes

Δευτέρα, 10 Ιούλιος 2006, 07:45 by Giannis Papaioannou

Do you have a long todo list (saved in your head)?
Do you always have zilions of open xterms?
Do you keep notes within files with names like foo, bar, how_to_cook_a_couple_of_eggs, etc?

The solution (or just a solution).

  apt-get install note

After installation, uncompress and copy the file /usr/share/doc/note/examples/noterc.gz to $HOME/.noterc. Then edit it to your liking. You need this if you want to enable encryption or disable the interactive mode (interactive mode sucks).

Now, you can keep notes at any time by just running note in one of your open xterms (or open one more). You can search your notes with -s argument. And you can organize your notes by topic, just by add ing your topic in the first line of a note quoted inside slashes.

Works great when compined with other shell utilities, especially grep.

this blog

Δευτέρα, 10 Ιούλιος 2006, 07:27 by Giannis Papaioannou

I have to do something about my blog, it's ugly and messy.

This line is needed or else... null exception

Black screen of death

Σάββατο, 17 Ιούνιος 2006, 11:57 by Giannis Papaioannou

It's been a while since I solved this in ubuntu. After starting Xorg, when pressing ALT-CTRL+F1-6 to change to a console, the screen was becoming blank black. There was no way to return to Xorg but CTRL-ALT-DEL was soft rebooting the system. This bug started somewhere between dapper upgrades in March, I expected it to be fixed with another upgrade until dapper made it to stable release.

The problem is a bug of i810 driver for Xorg (and maybe of some other drivers like mga). I had setup a clone screen for the vga output of my laptop and for that reason the following statement was in my xorg.conf:

Option "MonitorLayout" "CRT,LFP"

Removing this statement fixed the problem. It seems that using the MonitorLayout option causes the problem no matter what I set it to. Mystirious are the ways of Xorg.

Aircracking just for fun

Κυριακή, 11 Ιούνιος 2006, 01:27 by Giannis Papaioannou

Last week I bought a set of wireless transmitter/receiver for audio and video. I like to use my pc for home entertainment, like watching movies, listening to music or videoclips and stuff. In my new house though, connecting the pc to the TV with cables as I used to do in my previous home, is not a very good idea, since now they are in different rooms in the opposite sides.

At last, I'll be able to watch a movie in my living room.

Oops, not quite yet. These wireless A/V devices are using the free band at 2.4 Ghz and in this place there is a festival of telecommunication airwaves. Unfortunately, there was a lot of noise and there was no way somenone could enjoy a movie in this quality. Especially when using the microwave oven.

WiFi standard for wireless LANs is divided to 14 channels. The "good" channels 1,6,11 and 14 are already used. There is a fair amount of signal in channels 1-5 from various wireless APs in the close vicinity. Channel 6 is used by my indoor router. And channel 11 is used by another indoor router that belongs to one of my neighbours. Channel 14 is not legal in my country.

The A/V transmitter has only four channels available that are propably an equal division of the range 2.40-2.48 Ghz. None of them seemed to be unaffected by all this wireless network traffic. Then, I had an idea. My neighbour's wlan was unecrypted with free access, and I knew his router had the default password for its' administration interface ;-) . So I connected to his/her network, accessed the administration interface and changed the channel used from 11 to 1. Well, I figured that if s/he had let MS Windows to control the WiFi pccard s/he wouldn't notice any change since channel resolution in this case is automatic.

After that, the receiver was working fine in the 4th channel and finally I could happily watch the 'Pirates of Silicon Valley'.

What the heck this has to do with aircracking? A couple of days later the reception was bad again. I checked by scanning for networks and found out that my neighbour was using channel 11 again, and this time with WEP encryption. I guess, me changing the channel of his router did cause a problem to him/her. S/He must of contact the technicall support of his/her DSL provider which then advised him to use WEP encrytpion just as a precaution.

First, I solved the problem of the A/V reception by changing my own router's channel from 6 to 1 and my A/V transmitter to the 3rd channel (somewhere between channel 6 and 11 for WLANs) and then experimenting by placing the A/V transmitter and receiver in various locations until the received picture was clear. I actually got a nice result with the only disadvantage that my A/V receiver is now hanging on the edge on top of my TV.

And then, I was curious to see how secure WEP is. It is known to have very poor encryption that is easily exploited.

apt-get install aircrack.

Aircrack is a set of tools for hacking wireless networks. To crack a WEP encrypted signal someone first has to gather enough packets (or ivs) from the encrypted network by using the airodump tool. Then, aircrack tool analyzes the packets and calculates the encryption key.

Yesterday I left my laptop in airodump mode all day. When I came back home in the evening, airodump had gathered enough packets to crack a 128bit WEP key. It took less than two seconds for aircrack to provide me with a five bytes long hexadecimal key. My neighbour, typicall lame user, didn't bothered to think of a 128bit key (needs 11 characters instead of 5). What a surprise, s/he didn't even changed the default password for administration interface of his/her router.

This time though, I didn't mess with his/her settings, this was only for educational purposes (Actually, it was too easy to be of any other educational gain than that WEP is completely useless). Maybe I have to find out who is this neighbour and then use some of Kevin's social engineering to pursuade him/her to change the channel because it interferes with my A/V signal.

Ubuntu 6.06 (Dapper) at last

Παρασκευή, 02 Ιούνιος 2006, 10:04 by Giannis Papaioannou

Last two days I noticed that there were no upgrades for my ubuntu laptop. Then I looked the calendar, today is 2/6/06. Ubuntu Dapper release was ready on time. Now, my laptop is supposed to be running a stable operating system.

I should of noticed that some of the annoynces were going away, but still caught me by surprise. Anyway, the biggest bug remains, after running Xorg server and if I switch from X to a console, then I get a blank screen and my only option is to press ctrl-alt-del and reboot. Unfortunately, my googling for this didn't help much, I'll have to make a serious effort to solve this.

Summer thunderstorm

Πέμπτη, 01 Ιούνιος 2006, 10:50 by Giannis Papaioannou

What happens when your house is wired top to bottom, you have a lot of bad karma and the first summer thunderstorms are coming.

Symfony project

Τετάρτη, 17 Μάϊος 2006, 11:02 by Giannis Papaioannou

Last couple of days I'm experimenting with Symfony. A small php project has been assigned to me and I needed a new framework to build upon. PHPlib used to be my favorite choice, but now seems obsolete. I had a eye for a new framework some time now, I was searching for something open source, free, PHP5 compatible that would integrate a templating system, database abstraction, user authentication, and database backend sessions.

The previous php app that I had worked on, I gave a shot at Sourdough. it seemed like a promising framework, implementing a flyweight design with PHP5's new Object Model. But it lacked of good documentation and I had to spend a lot of valueable time to solve the riddles. I really regret that choice.

Now, I chose the Symfony project. Symfony has a LOT of documentation and very good examples and tutorials. It is very similar to what the Apache Turbine is for java webapps. It integrates propel which works much like torque, and phing that's similar to apache ant. All requests are made with smart urls through a front controller. A development version of the front controller gives you debuging info and there is also support for unit testing. An application controls or presents its' data by using modules that take actions. This is exactly like the MVC design implemented in Apache turbine project.

The problem is that there's not enough time left for experiments as I have to have a complete working application in less than two weeks. And I've already lost enough time developing a part of the app in standard php that must be reimplemented in the new and unfamiliar yet framework.

Ok, going back to work now.

The lost firmware for ipw2200 module

Δευτέρα, 15 Μάϊος 2006, 11:39 by Giannis Papaioannou

Last night I felt like upgrading the linux kernel on my laptop (Sony Vaio VGN-FS215B) which runs an Ubuntu (Dapper). I prefer running a custom built kernel on this machine because, when using the precompiled kernels that come with the distribution, a lot of unwanted modules persist on mistakenly load themselfs. The previous kernel I had installed was 2.6.15.1 which was the latest kernel with Dapper when I decided to upgrade from Breezy. Now, 2.6.15.6 is available as a source package.

Taking all the steps by the book, untar, make oldconfig, make-kpkg kernel_image etc, in not so few minutes the deb package was ready. Reboot.

And then there were none... gouhou gouhou... there was no wlan0. dmesg showed me that the ipw2200 which controls the wireless device couldn't find the appropriate firmware. By checking with Documentation/networking/README.ipw2200 within the kernel tree, I found out that I had to download the firmware (from here) myself and put it in /lib/firmware/`uname -r`dir. Also the ipw2200 driver changed from version 1.0.10 in 2.6.15.1 kernel to 1.1.1 in the 12.6.15.6 kernel, which means that the already installed firmware is not usefull anymore.


This process of installing the firmware by hand in a base installation's directory, is so much not what I have been used to by the Ubuntu maintainers. After all the license does not prohibit redistribution as long as the license agreement goes with the product on the same directory. If not a package in an unofficial repository, at least an automatic download of the license agreement and then, if agreed by the user, the firmware itself would be nice.

Reconnecting to WTHESS, the chronicles

Δευτέρα, 08 Μάϊος 2006, 12:53 by Giannis Papaioannou

Last year, after I had finnished my mandatory 1 year service to the military, I had to find some place to leave. Luckly, it was time for my friend Yorgos to serve the army for one year so he let me take his house until I find a better place for myself. Yorgos had just connected to wthess network by setting up an old pc ecquiped with a WiFi card on the rooftop of his house. Since then, I'm an active member of this community and have been enjoying the benefits of it. That is totally free communication of any level and type with my mates, instant messaging, email, VoIP, multiplayer games, file sharing and internet sharing.

But someday I had to move. This happened in February, so I had to setup my own rooftop router.

How hard it is, and how much does it cost?

First, I had to investicate the new building and assess the potential. The initial problem was to find a route for 2 cables (power and ethernet) from my apartment to the rooftop, that is 2 floors away. Another problem was where to place the antenna(s). Well, people are suspicious and biased, they worry about things like radiation, communication privacy of their cell phones, bad tv signal reception and stuff like that. There are also rules concerning constructions on buildings set by the urban design authority. So, the whole installation should be at least discreet if not entirely invisible. At the time, this seemed imposible. The only way I could pass the cables outside seemed to be by opening an ugly hole to the wall, and even then the structure of the building would force me to leave the cables hanging far away from the main wall.

A nice thing in this world is that good people can be found anywhere at any time and I was fortunate enough to meet one, the building manager (A not very nice thing in this world is that bad people can also be found anywhere at any time, I just hope won't meet that one). Not only he took the whole thing warmly and enthusiasticly, but he also gave me the best hint on how to install the wiring. There is a couple of water pipes connecting each apartment's bathroom with the rooftop, reserved for future use with solar heaters.

Then, moving to the next big problem, where to place the antenna(s). Some of my wthessian friends gathered on my rooftop one nice sunday evening. We figured our target peers by using my laptop ecquiped with a pcmcia WiFi card connected to a hand-made feeder. We scanned the perimeter using Netstumbler program and established visual contact with the final targets. After further talk with the building manager the final decision for the antenna placement was taken. The antenna pole would be placed on the side wall of the small house protecting the elevator machine and the router pc upon its' roof where it would be better protected and out of reach from other people.

Since everything was figured out, the only thing left was the installation. For the router I used an old pc I had, a Pentium II 300MHz and 64 MB RAM ecquiped with a PCI Planet WL-8310 WiFi card and an old CD-RW drive, no hard drive or floppy requiered. This costed me nothing since I already had the pc and the card was a birthday gift from Yorgos. A rough estimation of the cables' length was 15-20 meters. I bought 30 meters of UTP Cat5e cable and 20 meters of power cord, those costed me about 20 euro with the endings and plugs included, but forgot to ask how much was per meter, just payed and left the shop. to protect the router pc from air, dust, rain etc, a plastic water proof box was used. This box was enhanced with 3 pigtails for WiFi signal output, a UTP and a power supply input, all made by Air-Guy with a final cost of 45 euro. Air-Guy was also the provider of the 5 meter wbc400 cable that connected the box with the antenna, this should cost at least 13 euro but Air-Guy is a nice fellow and gave it to me for nothing. Finally, the antenna, an omni directional at 9db bought from an online shop at the cost of 51 euro. I also have to include the cost of a light 6 step ladder, 34 euro.

The installation of the cables was more than half of a day's hard work. The pipes have a 90 degrees turn and the cables couldn't slide after that turn. Some olive oil helped to lubricate the inner surface of the pipes. At the end, I had blisters on my hands and everything messy and oily but I had electricity and ethernet connection to the rooftop. I installed the pole with the antenna and connected all the cables, my rooftop-pc was ready to operate, all it was needed was the operating system. All wthess wireless links use Paladir (greek site) for that. Paladir is a linux based home-brew OS which is always provided as a small iso image that can fit in a floppy disk. Thanasakis, which is one of the developers and maintainers of Paladir provided me the required image configured appropriately according to the needs of my router pc. No need for me to know anything about linux or paladir, just burned the image to a cdrw disk and slide it into the drive.

That's it. I'm connected.


Everything must have an end.

Παρασκευή, 17 Μάρτιος 2006, 04:41 by Giannis Papaioannou

So say some philosophies/religions of the far east. But before the end... there must be a start.

A greek proverb says that beginning is half of everything. I guess today, starting this blog is equal to writing everything else I'm going to post here.

I work as a systems administrator in a laboratory of Mechanical Engineering at Aristotle University of Thessaloniki. Despite that my job description is "Administration of Network Infrastructure" my real job profile is administration of everything except economics (sometimes I wish it was the other way around). Just for not trying to exaggerate, my every day tasks include administration of user accounting, technical support, networking, linux/unix and windows. Also programming, web designing, graphics manipulation and last everything that requires a screw driver or a hammer.

My hobbies are near the above activities with the addition of computer gaming. I was a fairly good quake3 player... in general I prefer FPS games and maybe some adventures. I also am a member of a dark underground community known as WTHESS, it's about creating an amateur but yet a stable, reliable and secure wireless network over the roofs of the city Thessaloniki (for more info on the later see http://www.wthess.net).

Anyway, I intend to write in any of the two languages (Greek & English) that helps me express myself better. Most of the entries in this blog will be technical stuff from my experiences with Linux or any other system, from software development and other stuff like that.