Jan 29 2008

Limited Shell (lshell)

Tags:, , , , Ignace Mouzannar (-ghantoos-) @ 11:42 am

As I was wondering how I could do to relieve my wrt54gl from the huge weight of libopenssl and nsupdate, I thought.. Wouldn’t it be cool if I could set a very restricted account on my server, and just ask my wrt54gl to ssh to it and execute locally nsupdate. So I started searching for a way to restrict user ssh accounts by listing a set a allowed commands. No luck there.

So.. python came to the rescue.

Limited Shell (lshell) is an application that lets you restrict the environment of any SSH user. It provides an easily configurable shell: just choose a list of allowed commands for every limited account. No installation is required.

You can download the current version of lshell from the following link: http://sourceforge.net/project/showfiles.php?group_id=215792

If you want to contribute to this project, please do not hesitate.
Send me a patch, or just your new lshell.py so I can check it out.
You can use the interface on sourceforge.net:
http://sourceforge.net/projects/lshell/

Cheers,
Ghantoos


Nov 29 2007

WRT54GL: OpenWRT Kamikaze 0.9 and dynamic DNS (nsupdate/bind)

Tags:, , , , , , Ignace Mouzannar (-ghantoos-) @ 2:34 pm

Hello again,

My first objective was to update my DNS from my home. The problem was:
1- I wanted it to be secure (at least the most secure possible)
2- my PC is behind a beautiful WRT54GL which leaves me with nothing but my LAN IP.
I had to install the stuff on my linksys running Kamikaze0.9 of OpenWRT.
After some research and some small space headaches (WRT54GL), here is what I did:
Continue reading “WRT54GL: OpenWRT Kamikaze 0.9 and dynamic DNS (nsupdate/bind)”


Nov 22 2007

Nokia N70 (S60 series), python and your PC

Tags:, , , , Ignace Mouzannar (-ghantoos-) @ 4:21 pm

Here is a small briefing of how to connect your Nokia S60 series and your PC through bluetooth:
1- to send a file to your mobile
2- to get your mobile python console on your box!

Continue reading “Nokia N70 (S60 series), python and your PC”


Oct 25 2007

python: pyExcelerator module very little howto

Tags:, , , , Ignace Mouzannar (-ghantoos-) @ 5:02 pm

As a small reminder for myself, I post the thread about pyExcelerator.

pyExcelerator is a nice little python module that let’s you write Excel files (not openOffice spreadsheet, the other kind..).

For Ubuntu users, it is very easy to install: sudo apt-get install python-excelerator

Here basic script to write in ‘Hello World!’ excel file:

#!/usr/bin/env python    

import os
from pyExcelerator import *    

curpath = os.path.dirname(__file__)   

workbook = Workbook()
worksheet = workbook.add_sheet('My colour Sheet')
worksheet.write(0,0, 'Hello World!')
workbook.save(os.path.join(curpath, 'test.xls'))

Continue reading “python: pyExcelerator module very little howto”


Oct 25 2007

L’open-source, rempart aux effets néfastes de l’orgueil du développeur… By Stephbul

Tags:, , Ignace Mouzannar (-ghantoos-) @ 10:25 am

Voici un article clairvoyant notant la différence entre la fierté et l’orgueil d’un développeur qui publie son travail en opensource.. ou pas.

http://www.bulot.org/2007/10/25/lopen-source-rempart-aux-effets-nefastes-de-lorgueil-du-developpeur/

cheers Stephbul!

Ghantoos


Oct 24 2007

kvm/qemu bridging with dummy network card

Tags:, , , , , , , Ignace Mouzannar (-ghantoos-) @ 8:34 pm

I wanted to setup some VMs using kvm (i had the same problem using xen). The solution a chose to connect my VMs to the internet was to do it through bridging.
My only problem is that my eth0 (main and only ethernet card is connected straight to the Internet. So bridging loses its meaning because I could not choose new IP addresses for my virtual boxes.

The solution: creating a dummy network interface!

With this scenario, i’ll have all my dumUs bridged to the dummy interface (dummy0) and the bridge (br0) NATed through eth0. I hope I’m clear enough. : )

Here is how my /etc/network/interfaces file looks like:
Continue reading “kvm/qemu bridging with dummy network card”


Oct 05 2007

HOWTO: apache2 & mod_python.psp

Tags:, , , , , , , Ignace Mouzannar (-ghantoos-) @ 12:03 am

Here is a second howto about the PSP handler of mod_python.

Hope this is useful!

http://ghantoos.org/index.php/howto-apache2-mod_python/#mod_python.psp

Cheers,

Ghantoos


Sep 29 2007

HOWTO: apache2 & mod_python.publisher

Tags:, , , Ignace Mouzannar (-ghantoos-) @ 8:20 pm

After a bit of research and some debugging time, and as i couldn’t find obvious mod_python howtos, I decided to write a little Apache2/mod_python.publisher howto.

http://ghantoos.org/index.php/howto-apache2-mod_python/

Cheers,

Ghantoos


Sep 24 2007

Apache mod_python local module import

Tags:, , , Ignace Mouzannar (-ghantoos-) @ 1:39 pm

I have searched a lot before finding this tip, so I post it.
It show how to easily import with mod_python a module based on a personal .py file located somewhere on your box.
In this example, I will try to import the module bloup.py located in the same directory of my index.py mainpage.
when trying to import using the usual means, i get:

#!/usr/bin/env python
import os
import bloup
...

>>>ImportError: No module named bloup

The solution I found was:
Continue reading “Apache mod_python local module import”


Sep 18 2007

NextGen Gallery SQL script (to scan folders and add them as galleries)

Tags:, , , , , , , , Ignace Mouzannar (-ghantoos-) @ 5:51 pm

This time I needed this time to provision the NextGen SQL database with all the folders I’ve put on my server.

Again, i did a little python script. I scans your NextGen gallery folder, and enters all new folders as “galleries” in the SQL DB, and creates the thumbs for the pictures.

This was usefull for me. : )
Continue reading “NextGen Gallery SQL script (to scan folders and add them as galleries)”


Next Page »