Pas de mémoire mais un bloc-notes pour ne pas rechercher deux fois la même chose, en espérant pouvoir servir à d'autres...
21 décembre 2006
Extraction de cd soundjuicer
Sound Juicer/Edition/Préférences/Format de sortie/Editer les profils/Wav/Edition/Pipeline GStreamer
Il faut modifier les valeurs indiquées ci dessous :
audio/x-raw-int,rate=22050,channels=1 ! wavenc name=enc (par défaut)
audio/x-raw-int,rate=44100,channels=2 ! wavenc name=enc (aprés correction)
sinon sound juicer refuse de lier le pipeline
09 novembre 2006
connecter un téléphone UTstarcomm (VoWiFi) sur un AP Cisco Aironet 1131AG IOS 12.3(8ja) avec la sécurité WPA
Les solutions:
avoir ces paramètres sur le point d'accès sinon aucune connexion possible
dot11 wpa handshake timeout 500
interface Dot11Radio0
no dot11 extension aironet
dot11 qos mode
no world-mode (dot11d country BE both) (à priori pas nécessaire)
24 octobre 2006
conversion ext2 vers ext3
First, think long and hard before deciding to convert the root directory. Ext3's primary purpose is shorter recovery from disaster rather than data loss prevention. Converting the root directory from Ext2 to Ext3 isn't difficult, but converting it back from Ext3 to Ext2 is a treacherous process fraught with problems. But, if you really must perform the Ext2 to Ext3 conversion on the root directory, here's how, assuming /dev/hda2 is mounted as the root directory and /dev/hda1 is mounted as /boot:
* Log in as root
* Edit /etc/fstab and change ext2 to ext3 on the line referencing the root directory.
* tune2fs -j /dev/hda2
* cd /boot
* mv initrd-2.4.18-26.8.0.img initrd-2.4.18-26.8.0.img.ext2
* mkinitrd initrd-2.4.18-26.8.0.img 2.4.18-26.8.0
* reboot
In the preceding, you MUST perform all the steps, including the mkinitrd, before rebooting. Failing to perform all the steps before rebooting produces a "buried shovel" where if only you could boot the machine, you could run the mkinitrd command, and if only you could run the mkinitrd command, you could boot the machine.
23 octobre 2006
changer la configuration du clavier
terminal: loadkeys be-latin1|us|uk|...
serveur X: setxkbmap
Persistant distribution spécifique:
RHEL : system-config-keyboard
Debian: dpkg-reconfigure console-data
20 octobre 2006
Wine basics
Wine Quickstart Guide
This Quickstart Guide will help you to get Wine running. Make sure you have Wine installed. If you don't check this page on installing Wine: http://winehq.org/site/docs/wineusr-guide/getting-wineInstalling an application
In this guide I will show you how to install MS Office 97.In order to install an application you must know the name of the file to run and the location of the file.
In this example I must run setup.exe which is loacted in /media/cdrom.
To install Office I must run the following command:
$ wine /media/cdrom/setup.exe
The application will now be installed.
Running an application
The application will be installed in a directory called .wine in your HOME directory. If your file manager doesn't show this directory make sure that it shows hidden files/directories (.wine is a hidden directory).Office is installed in ~/.wine/drive_c/Program Files/Microsoft Office/Office
If I want to run Word I must type the following lines:
$ cd ~/.wine/drive_c/Program Files/Microsoft\ Office/Office
$ wine winword.exe
It might be a good idea to create a file that launches Word. It could look like this:
#/bin/sh
cd ~/.wine/drive_c/Program Files/Microsoft\ Office/Office
wine winword.exe
Save this as word.sh in ~/bin and make it executable by typing chmod +x word.sh
You can now start Word by typing word.sh
05 octobre 2006
04 octobre 2006
wpa supplicant
- apt-get install wpasupplicant et wpagui
- créer fichier de config : par exemple : /etc/wpa_supplicant.conf
(voir plus bas en fonction de la méthode utilisée)
- mettre les certificats adéquat, par exemple dans : /etc/cert/*.*
client.p12 root.pem client.pem root.der
- lancer la commande :
wpa_supplicant -d -c/etc/wpa_supplicant.conf -ieth1 -Dwext
--> se lance en mode debugg
--> pour lancer en background : -B au lieu de -d
--> -Dwext dépend du driver utilisé faire un man de wpasupplicant
- lancer la commande :
wpa_gui
--> interface pour vérifier état de connexion et donner des paramètres complémentaires
--> il peut être nécessaire de faire un dhclient eth1 pour obtenir une adresse ip
--> il peut être nécessaire de définir l'interface par défaut (eth1 au lieu de eth0)
Exemples de configuration
---------------------------------------------------------
# WPA-PSK
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MULTITELWIFI"
key_mgmt=WPA-PSK
psk="*****************"
}
---------------------------------------------------------
--> OK
---------------------------------------------------------
# WPA-EAP/TLS
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MULTITELWIFI"
key_mgmt=WPA-EAP
eap=TLS
ca_cert="/etc/cert/root.pem"
private_key="/etc/cert/client.p12"
private_key_passwd="***************"
}
---------------------------------------------------------
--> promp pour le paramètre identity
sinon, on peut mettre en dur identity="username"
---------------------------------------------------------
# WPA-EAP/TTLS
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MULTITELWIFI"
key_mgmt=WPA-EAP
eap=TTLS
ca_cert="/etc/cert/root.pem"
}
---------------------------------------------------------
--> prompt pour les paramètre identity et password
sinon, mettre en dur :
---------------------------------------------------------
# WPA-EAP/TTLS avec paramètres dans le fichier pour éviter #prompt
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MULTITELWIFI"
key_mgmt=WPA-EAP
eap=TTLS
identity="******"
password="***********"
ca_cert="/etc/cert/root.pem"
}
---------------------------------------------------------
--> OK
---------------------------------------------------------
# WPA-EAP/PEAP
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MULTITELWIFI"
key_mgmt=WPA-EAP
eap=PEAP
ca_cert="/etc/cert/root.pem"
}
---------------------------------------------------------
--> OK
---------------------------------------------------------
29 août 2006
Compression d'une archive .TAR.GZ
Syntaxe: tar
Dans les options, on doit mettre c pour créer une archive et non la décompresser, f pour indiquer qu'il s'agit d'un fichier, on peut mettre z pour compresser avec Gzip, et v si on désire avoir la liste des fichiers compressés qui défile.
Exemple: tar cfvz kfilecoder.tar.gz /root/projects/kfilecoder
Dans cet exemple, on crée un fichier kfilecoder.tar.gz compressé avec Gzip, dans lequel on met tous les fichiers contenus dans le dossier /root/projects/kfilecoder
28 août 2006
21 août 2006
tftp server sur ubuntu 6.06
il faut changer la config par défaut
daemon mis à yes et -c pour permettre l'upload de nouveaux fichiers
les fichiers uploadés le seront dans le répertoire /var/lib/tftpboot
vi /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -c -s /var/lib/tftpboot"
:wq
chmod 755 /var/lib/tftpboot
/etc/init.d/tftpd-hpa start
18 août 2006
OOo debug
OOo plante à l'ouverture d'un fichier quel qu'il soit
Si on démarre OOo seul OK mais plante à l'ouverture d'un fichier
Si on le démarre en root OK
Solution:
vider le cache des documents récents
soit mv .recently-used .recently-used-2 (dans le home de l'utilisateur)
soit raccourcis > documents récents > vider les documents récents
17 août 2006
plusieurs pages par feuille (linux)
psnup -2 -c -pa4 -Pa4 entree.ps sortie2.ps
ou petit script (/usr/local/bin/imprime)
#! /bin/bash
gui=`zenity --title="Selectionnez le fichier à imprimer" --file-selection `
cp $gui ~/source.ps
nombre=`zenity --list --radiolist --text "Choisissez le nombre de pages par feuilles à imprimer" --column "nombre" --column "de pages" TRUE 2 False 4 False 8`
format=`zenity --list --radiolist --text "Choisissez le format du papier" --column "Choix" --column "du format" TRUE a4 False a3 False letter`
echo $nombre
echo $format
psnup -$nombre -p"$format" ~/source.ps ~/sortie.ps
rm ~/source.ps
imprimante=`zenity --list --radiolist --text "Choisissez votre imprimante" --column "Choix" --column "nom imprimante" TRUE HL-5050 False LaserJet-1100 False AcuLaser-C4000`
lpr -P "$imprimante" ~/sortie.ps
rm ~/sortie.ps
reste à laisser choisir l'imprimante depuis une liste dynamique lpstat -v
et à gérer les pages "paysage" une option dans psnup à rajouter
14 août 2006
VMware server on Ubuntu 6.06
Avant de suivre ce howto installer les linux-headers, linux-source et linux-kernel-headers relatifs à votre noyau
/usr/src/linux-headers-2.6.15-27-386/include/ sera à indiquer si vous avez ce noyau par exemple en lieu et place de /usr/src/linux/include si votre noyau n'est pas reconnu...
How To Install VMware Server On Ubuntu 6.06 LTS (Dapper Drake)
Version 1.0
Author: Till Brehm
Last edited 07/13/2006
This tutorial provides step-by-step instructions on how to install the free VMware Server (version 1.0) on Ubuntu 6.06 LTS (Dapper Drake).
VMware has just released version 1.0 of its free VMware Server. With VMware Server you can create and run guest operating systems ("virtual machines") such as Linux, Windows, FreeBSD, etc. under a host operating system. This has the benefit that you can run multiple operating systems on the same hardware which saves a lot of money, and you can move virtual machines from one VMware Server to the next one (or to a system that has the VMware Player which is also free). In this article we use Ubuntu 6.06 LTS (Dapper Drake) as the host operating system.
I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Preliminary Note
I assume you have already set up a basic Ubuntu 6.06 system. It doesn't matter if you use Ubuntu's server or desktop version. If you use the server version, you can set up your system as described on the first three pages of this tutorial: The Perfect Setup - Ubuntu 6.06 LTS Server (Dapper Drake).
You should have a working root account (as the following steps have to be run as root) or run
sudo su
to get root priveliges and also a static IP address. In this tutorial I use the IP address 192.168.0.100.
2 Installing Required packages
Now we install the packages required by VMware on our Ubuntu system:
apt-get install linux-kernel-headers libx11-6 libx11-dev libxtst6 xlibs-dev xinetd wget
apt-get install gcc binutils-doc cpp-doc gcc-4.0-locales make manpages-dev autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.0-doc libc6-dev-amd64 lib64gcc1
and create the directory /var/vm where we want to install our virtual machines later. The virtual machines require much disk space, make sure you have enough free space on your /var partition for the virtual machines.:
mkdir /var/vm
3 Getting VMware Server
The VMware server can be downloaded for free from the VMware website: http://www.vmware.com/download/server/
To run the VMware Server software you need a (free) serial number, that can be requested by clicking on the "Register now" button on the download page.
4 Downloading The Software
To setup VMWare Server on Ubuntu, we need the following packages from the VMware downloads page:
VMware Server for linux (Binary tar.gz)
Management Interface (Binary tar.gz)
To create new virtual machines, we need VMware server client package either for Windows if you want to create them from your Windows workstation or for Linux if you have a Linux workstation.
For downloading the software to your server, I recommend to use the linux commandline program wget. The wget syntax is as follows:
wget [URL of the file that shall be downloaded]
Unpacking the server tar.gz:
tar xvfz VMware-server-*.tar.gz
Running the installer script:
cd vmware-server-distrib
./vmware-install.pl
The installer asks you a few questions. Most of the time you can accept the default value:
Creating a new installer database using the tar3 format.
Installing the content of the package.
In which directory do you want to install the binary files?
[/usr/bin] <-- /usr/bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] <-- /etc
What is the directory that contains the init scripts?
[/etc/init.d] <-- /etc/init.d
In which directory do you want to install the daemon files?
[/usr/sbin] <-- /usr/sbin
In which directory do you want to install the library files?
[/usr/lib/vmware] <-- /usr/lib/vmware
The path "/usr/lib/vmware" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want? [yes] <-- yes
In which directory do you want to install the manual files?
[/usr/share/man] <-- /usr/share/man
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware] <-- /usr/share/doc/vmware
The path "/usr/share/doc/vmware" does not exist currently. This program is going
to create it, including needed parent directories. Is this what you want?
[yes] <-- yes
The installation of VMware Server 1.0.0 build-28343 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall.pl".
Before running VMware Server for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config.pl". Do you want this
program to invoke the command for you now? [yes] <-- yes
Making sure services for VMware Server are stopped.
Stopping VMware services:
Virtual machine monitor done
You must read and accept the End User License Agreement to continue.
Press enter to display it.
..... snip [LICENCE TEXT] ......
Do you accept? (yes/no) <-- yes
Thank you.
Configuring fallback GTK+ 2.4 libraries.
In which directory do you want to install the mime type icons?
[/usr/share/icons] <-- /usr/share/icons
The path "/usr/share/icons" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want? [yes] <-- yes
What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications] <-- /usr/share/applications
The path "/usr/share/applications" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes] <-- yes
In which directory do you want to install the application's icon?
[/usr/share/pixmaps] <-- /usr/share/pixmaps
Trying to find a suitable vmmon module for your running kernel.
The module bld-2.6.15-23-i386server-Ubuntu6.06 loads perfectly in the running
kernel.
Do you want networking for your virtual machines? (yes/no/help) [yes] <-- yes
Configuring a bridged network for vmnet0.
The following bridged networks have been defined:
. vmnet0 is bridged to eth0
All your ethernet interfaces are already bridged.
Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes] <-- yes
Configuring a NAT network for vmnet8.
Do you want this program to probe for an unused private subnet? (yes/no/help) <-- yes
Probing for an unused private subnet (this can take some time)...
The subnet 192.168.246.0/255.255.255.0 appears to be unused.
The following NAT networks have been defined:
. vmnet8 is a NAT network on private subnet 192.168.246.0.
Do you wish to configure another NAT network? (yes/no) [no] <-- no
Do you want to be able to use host-only networking in your virtual machines?
[yes] <-- yes
Configuring a host-only network for vmnet1.
Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes] <-- yes
Probing for an unused private subnet (this can take some time)...
The subnet 172.16.37.0/255.255.255.0 appears to be unused.
The following host-only networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.37.0.
Do you wish to configure another host-only network? (yes/no) [no] <-- no
Trying to find a suitable vmnet module for your running kernel.
The module bld-2.6.15-23-i386server-Ubuntu6.06 loads perfectly in the running
kernel.
Please specify a port for remote console connections to use [902] <-- 902
Stopping internet superserver: xinetd.
Starting internet superserver: xinetd.
Configuring the VMware VmPerl Scripting API.
Building the VMware VmPerl Scripting API.
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
Installing the VMware VmPerl Scripting API.
The installation of the VMware VmPerl Scripting API succeeded.
Generating SSL Server Certificate
In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines] <-- /var/vm
Please enter your 20-character serial number.
Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: <-- your VMware Server serial number
Starting VMware services:
Virtual machine monitor done
Virtual ethernet done
Bridged networking on /dev/vmnet0 done
Host-only networking on /dev/vmnet1 (background) done
Host-only networking on /dev/vmnet8 (background) done
NAT service on /dev/vmnet8 done
The configuration of VMware Server 1.0.0 build-28343 for Linux for this running
kernel completed successfully.
5 Installing The VMware Management Interface
The VMware Management Interface is a Web-based management tool that allows you to
- monitor the state of virtual machines and the VMware Server host on which they are running.
- control (power on, suspend, resume, reset and power off) the virtual machines on that host.
- view details about each virtual machine, including system summary, hardware information, any connected users and a log of recent events.
(Please note: it cannot be used to create virtual machines. To do this, you must install the VMWare console (available for Windows and Linux) on a client PC.)
cd /tmp
tar xvfz VMware-mui-*.tar.gz
cd vmware-mui-distrib
./vmware-install.pl
Accept the end user licence:
Do you accept? (yes/no) <-- yes
Thank you.
Installing the content of the package.
In which directory do you want to install the binary files?
[/usr/bin] <-- /usr/bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] <-- /etc
What is the directory that contains the init scripts?
[/etc/init.d] <-- /etc/init.d
In which directory do you want to install the VMware Management Interface files?
[/usr/lib/vmware-mui] <-- /usr/lib/vmware-mui
The path "/usr/lib/vmware-mui" does not exist currently. This program is going
to create it, including needed parent directories. Is this what you want?
[yes] <-- yes
In which directory would you like to install the documentation files?
[/usr/lib/vmware-mui/doc] <-- /usr/lib/vmware-mui/doc
The path "/usr/lib/vmware-mui/doc" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes] <-- yes
Before running VMware Management Interface for the first time, you need to
configure it by invoking the following command:
"/usr/bin/vmware-config-mui.pl". Do you want this program to invoke the command
for you now? [yes] <-- yes
The installation of VMware Management Interface 1.0.0 build-28343 for Linux
completed successfully. You can decide to remove this software from your system
at any time by invoking the following command:
"/usr/bin/vmware-uninstall-mui.pl".
Before running VMware Management Interface for the first time, you need to
configure it by invoking the following command:
"/usr/bin/vmware-config-mui.pl". Do you want this program to invoke the command
for you now? [yes] <-- yes
Configuring httpd.conf to run Apache as:
User: www-data and Group: nogroup
Set the number of minutes before a http session times out. (This is the length
of time before someone connecting to VMware Management Interface will be logged
out) [60] <-- 60
Generating SSL Server Certificate
Starting httpd.vmware: done
The configuration of VMware Management Interface completed successfully.
Create a directory for the VMware httpd:
mkdir /var/run/vmware/httpd
chown www-data:www-data /var/run/vmware/httpd
You will now be able to login the the VMware management interface with the URL:
https://192.168.0.100:8333/
To login use the username root and the password of your root system user.
This interface shows status information of the installed VM instances and you are able to start and stop VM instances:
To create new VM instances, use the VMware console which is availabe as Linux and Windows GUI application.
There are many ready-to-run appliances for the VMware server available, for example the ISPConfig webhosting appliance based on the HowtoForge perfect setup for Debian 3.1:
http://www.vmware.com/vmtn/appliances/directory/342
Many other appliances can be found in the VMWare Appliances directory:
http://www.vmware.com/vmtn/appliances/
6 Creating A Virtual Machine
We use the VMWare Linux or Windows GUI application to create a new virtual machine on our VMware server.
Login to your server with the IP address or hostname, the user root and the root password.
Click on New Virtual Machine and follow the whizard. The wizard asks you to select:
- Operating system (Linux, Windows, Novell Netware, Solaris or other operating system)
- Operating system version
- Location and virtual machine name. The folder /var/vm that we created in the setup is preselected.
- Networking: If you want the virtual machine to be part of the same network than the server itself, select bridged networking.
If you want to use a virtual NAT, select Network address translation. - Enter the size of your virtual harddisk. I recommend to disable the option that creates the virtual harddisk in full size instantly, the harddisk will then grow with the data that you store inside up to the max. size you selected.
- After you finished the VM creation wizard, put the boot disk of the operating system you want to install in the CD / DVD drive of your server and start the VM.
All trademarks belong to their respective owners. We thank VMware Inc. for the permission to write this Howto.
7 Links
- VMware Server: http://www.vmware.com/products/server
- Ubuntu: http://www.ubuntu.com
- VMware Appliance directory http://www.vmware.com/vmtn/appliances/
11 août 2006
Impression de plusieurs pages sur une imprimante
sudo apt-get install psutils
psnup -pa4 -4 test.ps test4.ps (depuis le répertoire où se trouve le fichier à imprimer)
-pa4 (on veut du format a4 en sortie)
-4 quatre pages par feuille
fichier en entrée et fichier de sortie
ensuite il suffit d'imprimer à partir d'evince test4.ps
09 août 2006
Cisco VPN client under Ubuntu 6.06 (LTS) Linux
Avec la version vpnclient-linux-4.8.00.0490-k9.tar.gz plus besoin de patcher sur une ubuntu 6.06 (le reste reste valable)
Avec la version vpnclient-linux-4.7.00.0640-k9.tar.gz suivre ce howto:
One of my customers has a VPN which I'd like to access. They provided me with a copy of the Cisco VPN client for Linux, and a "pcf" configuration file for the client. Here's what i had to do to get the Cisco VPN client working in Linux - and it does work just fine.
First we make a directory to put the bits and bobs in
alan@hactar:~$ mkdir cisco
alan@hactar:~$ cd cisco/
I then downloaded the Cisco VPN client from my customers intranet and saved it in the cisco
directory I just created. I then unpacked it which makes a directory called vpnclient
and unpacks the files into it.
alan@hactar:~/cisco$ tar zxvf vpnclient-linux-4.6.02.0030-k9.tar.gz
vpnclient/
vpnclient/libvpnapi.so
vpnclient/vpnapi.h
vpnclient/cisco_cert_mgr
vpnclient/vpnclient
vpnclient/ipseclog
vpnclient/cvpnd
vpnclient/vpn_install
vpnclient/vpnclient_init
vpnclient/vpn_uninstall
vpnclient/driver_build.sh
vpnclient/sample.pcf
vpnclient/vpnclient.ini
vpnclient/license.txt
vpnclient/license.rtf
vpnclient/interceptor.c
vpnclient/linuxcniapi.c
vpnclient/linuxcniapi.h
vpnclient/vpn_ioctl_linux.h
vpnclient/IPSecDrvOS_linux.c
vpnclient/linux_os.h
vpnclient/frag.h
vpnclient/frag.c
vpnclient/GenDefs.h
vpnclient/mtu.h
vpnclient/IPSecDrvOSFunctions.h
vpnclient/IPSecDrvOS_linux.h
vpnclient/Cniapi.h
vpnclient/unixcniapi.h
vpnclient/config.h
vpnclient/libdriver.so
vpnclient/Makefile
Dive into the directory and check all the files are there
alan@hactar:~/cisco/vpnclient$ ls -l
total 4580
-rwxr-xr-x 1 alan alan 1149812 2005-03-11 22:43 cisco_cert_mgr
-rw-r--r-- 1 alan alan 15974 2005-03-11 22:43 Cniapi.h
-rw-r--r-- 1 alan alan 4474 2005-03-11 22:43 config.h
-rwxr-xr-x 1 alan alan 1943604 2005-03-11 22:43 cvpnd
-rwxr-xr-x 1 alan alan 1430 2005-03-11 22:43 driver_build.sh
-rw-r--r-- 1 alan alan 6301 2005-03-11 22:43 frag.c
-rw-r--r-- 1 alan alan 227 2005-03-11 22:43 frag.h
-rw-r--r-- 1 alan alan 4500 2005-03-11 22:43 GenDefs.h
-rw-r--r-- 1 alan alan 21952 2005-03-11 22:43 interceptor.c
-rw-r--r-- 1 alan alan 2524 2005-03-11 22:43 IPSecDrvOSFunctions.h
-rw-r--r-- 1 alan alan 5138 2005-03-11 22:43 IPSecDrvOS_linux.c
-rw-r--r-- 1 alan alan 1249 2005-03-11 22:43 IPSecDrvOS_linux.h
-rwxr-xr-x 1 alan alan 205464 2005-03-11 22:43 ipseclog
-rwxr-xr-x 1 alan alan 516924 2005-03-11 22:43 libdriver.so
-rwxr-xr-x 1 alan alan 356756 2005-03-11 22:43 libvpnapi.so
-rw-r--r-- 1 alan alan 4449 2005-03-11 22:43 license.rtf
-rw-r--r-- 1 alan alan 4130 2005-03-11 22:43 license.txt
-rw-r--r-- 1 alan alan 16856 2005-03-11 22:43 linuxcniapi.c
-rw-r--r-- 1 alan alan 1291 2005-03-11 22:43 linuxcniapi.h
-rw-r--r-- 1 alan alan 1852 2005-03-11 22:43 linux_os.h
-rw-r--r-- 1 alan alan 908 2005-03-11 22:43 Makefile
-rw-r--r-- 1 alan alan 1926 2005-03-11 22:43 mtu.h
-rw-r--r-- 1 alan alan 349 2005-03-11 22:43 sample.pcf
-rw-r--r-- 1 alan alan 946 2005-03-11 22:43 unixcniapi.h
-rw-r--r-- 1 alan alan 24385 2005-03-11 22:43 vpnapi.h
-rwxr-xr-x 1 alan alan 263264 2005-03-11 22:43 vpnclient
-rw-r--r-- 1 alan alan 172 2005-03-11 22:43 vpnclient.ini
-rwxr-xr-x 1 alan alan 2961 2005-03-11 22:43 vpnclient_init
-rwxr-xr-x 1 alan alan 13826 2005-03-11 22:43 vpn_install
-rw-r--r-- 1 alan alan 1008 2005-03-11 22:43 vpn_ioctl_linux.h
-rwxr-xr-x 1 alan alan 5992 2005-03-11 22:43 vpn_uninstall
To make this you need the kernel headers for your current running kernel version. uname -r
tells us the kernel version number:
alan@hactar:~$ uname -r
2.6.15-23-686
Using that information we can (in Ubuntu and other Debian based distributions) easily download the kernel headers with a command like this:
alan@hactar:~$ sudo apt-get install linux-headers-`uname -r`
Reading package lists... Done
Building dependency tree... Done
linux-headers-2.6.15-23-686 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.
Looks like I already have it. Lets double check:
alan@hactar:~/cisco/vpnclient$ ls /usr/src/linux-headers-2.6.15-23-686/
arch crypto include kernel mm scripts usr
block drivers init lib Module.symvers security
cluster fs ipc Makefile net sound
That all looks sane. Now we need to patch the client because it won't compile otherwise.
Get the patch from here:
Here is a direct link:
Save it in the vpnclient
directory then apply it:
alan@hactar:~/cisco/vpnclient$ patch -p0 <>
Do a quick make
to see if it compiles sanely.
alan@hactar:~/cisco/vpnclient$ make
make -C /lib/modules/2.6.15-23-686/build SUBDIRS=/home/alan/cisco/vpnclient modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.15-23-686'
CC [M] /home/alan/cisco/vpnclient/linuxcniapi.o
CC [M] /home/alan/cisco/vpnclient/frag.o
CC [M] /home/alan/cisco/vpnclient/IPSecDrvOS_linux.o
CC [M] /home/alan/cisco/vpnclient/interceptor.o
/home/alan/cisco/vpnclient/interceptor.c: In function ‘handle_vpnup’:
/home/alan/cisco/vpnclient/interceptor.c:312: warning: assignment from incompatible pointer type
/home/alan/cisco/vpnclient/interceptor.c:336: warning: assignment from incompatible pointer type
/home/alan/cisco/vpnclient/interceptor.c:337: warning: assignment from incompatible pointer type
/home/alan/cisco/vpnclient/interceptor.c: In function ‘do_cleanup’:
/home/alan/cisco/vpnclient/interceptor.c:380: warning: assignment from incompatible pointer type
LD [M] /home/alan/cisco/vpnclient/cisco_ipsec.o
Building modules, stage 2.
MODPOST
Warning: could not find /home/alan/cisco/vpnclient/.libdriver.so.cmd for /home/alan/cisco/vpnclient/li bdriver.so
CC /home/alan/cisco/vpnclient/cisco_ipsec.mod.o
LD [M] /home/alan/cisco/vpnclient/cisco_ipsec.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.15-23-686'
That looks good. Now lets do it for real with the vpn_install
script supplied by Cisco.
alan@hactar:~/cisco/vpnclient$ sudo ./vpn_install
Cisco Systems VPN Client Version 4.6.02 (0030) Linux Installer
Copyright (C) 1998-2004 Cisco Systems, Inc. All Rights Reserved.
By installing this product you agree that you have read the
license.txt file (The VPN Client license) and will comply with
its terms.
Directory where binaries will be installed [/usr/local/bin]
Automatically start the VPN service at boot time [yes]
In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.
Directory containing linux kernel source code [/lib/modules/2.6.15-23-686/build]
* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/2.6.15-23-686/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/lib/modules/2.6.15-23-686/build" will be used to build the module.
Is the above correct [y]
Making module
make -C /lib/modules/2.6.15-23-686/build SUBDIRS=/home/alan/cisco/vpnclient modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.15-23-686'
Building modules, stage 2.
MODPOST
Warning: could not find /home/alan/cisco/vpnclient/.libdriver.so.cmd for /home/alan/cisco/vpnclient/li bdriver.so
make[1]: Leaving directory `/usr/src/linux-headers-2.6.15-23-686'
Create module directory "/lib/modules/2.6.15-23-686/CiscoVPN".
Copying module to directory "/lib/modules/2.6.15-23-686/CiscoVPN".
Already have group 'bin'
Creating start/stop script "/etc/init.d/vpnclient_init".
/etc/init.d/vpnclient_init
Enabling start/stop script for run level 3,4 and 5.
Creating global config /etc/opt/cisco-vpnclient
Installing license.txt (VPN Client license) in "/opt/cisco-vpnclient/":
Installing bundled user profiles in "/etc/opt/cisco-vpnclient/Profiles/":
* New Profiles : sample
Copying binaries to directory "/opt/cisco-vpnclient/bin".
Adding symlinks to "/usr/local/bin".
/opt/cisco-vpnclient/bin/vpnclient
/opt/cisco-vpnclient/bin/cisco_cert_mgr
/opt/cisco-vpnclient/bin/ipseclog
Copying setuid binaries to directory "/opt/cisco-vpnclient/bin".
/opt/cisco-vpnclient/bin/cvpnd
Copying libraries to directory "/opt/cisco-vpnclient/lib".
/opt/cisco-vpnclient/lib/libvpnapi.so
Copying header files to directory "/opt/cisco-vpnclient/include".
/opt/cisco-vpnclient/include/vpnapi.h
Setting permissions.
/opt/cisco-vpnclient/bin/cvpnd (setuid root)
/opt/cisco-vpnclient (group bin readable)
/etc/opt/cisco-vpnclient (group bin readable)
/etc/opt/cisco-vpnclient/Profiles (group bin readable)
/etc/opt/cisco-vpnclient/Certificates (group bin readable)
* You may wish to change these permissions to restrict access to root.
* You must run "/etc/init.d/vpnclient_init start" before using the client.
* This script will be run AUTOMATICALLY every time you reboot your computer.
Yay! That all looks pretty good. There is a sample profile supplied with the client which lives by default in /etc/opt/cisco-vpnclient/Profiles/
, lets see:
alan@hactar:~/cisco/vpnclient$ ls /etc/opt/cisco-vpnclient/Profiles/
sample.pcf
Now I will copy the configuration file supplied by my customer to that location so the software can find it:
alan@hactar:~/cisco/vpnclient$ sudo cp *.pcf /etc/opt/cisco-vpnclient/Profiles/
Lets check they're there.
alan@hactar:~/cisco/vpnclient$ ls /etc/opt/cisco-vpnclient/Profiles/
XXX-XXX_XXX-VPN.pcf YYY-YYY_YYY-VPN.pcf ZZZ-ZZZ-ZZZ-1.pcf sample.pcf
(Note I've changed the names of the files to hide some info.)
The next bit will be started when I reboot, but as I don't want to reboot right now I'll start it myself:
alan@hactar:~/cisco/vpnclient$ sudo /etc/init.d/vpnclient_init start
Starting /opt/cisco-vpnclient/bin/vpnclient: Done
I'll now start the client to see if it starts.
alan@hactar:~/cisco/vpnclient$ ./vpnclient
Cisco Systems VPN Client Version 4.6.02 (0030)
Copyright (C) 1998-2004 Cisco Systems, Inc. All Rights Reserved.
Client Type(s): Linux
Running on: Linux 2.6.15-23-686 #1 SMP PREEMPT Tue May 23 14:03:07 UTC 2006 i686
Config file directory: /etc/opt/cisco-vpnclient
Usage:
vpnclient connect[user ] [eraseuserpwd | pwd ]
[nocertpwd]
vpnclient disconnect
vpnclient stat [reset] [traffic] [tunnel] [route] [repeat]
vpnclient notify
vpnclient verify [autoinitconfig]
vpnclient autoinit
Now we actually start the client and connect. Note that I start the client with the word "connect" and the name of the pcf file (without the pcf extension) as a parameter.
alan@hactar:~/cisco/vpnclient$ sudo vpnclient XXX-XXX_XXX-VPN
Cisco Systems VPN Client Version 4.6.02 (0030)
Copyright (C) 1998-2004 Cisco Systems, Inc. All Rights Reserved.
Client Type(s): Linux
Running on: Linux 2.6.15-23-686 #1 SMP PREEMPT Tue May 23 14:03:07 UTC 2006 i686
Config file directory: /etc/opt/cisco-vpnclient
Initializing the VPN connection.
Contacting the gateway at XXX.X.XX.XXX
User Authentication for XXX-XXX-XXXX-1...
Enter Username and Password.
Username [DOMAIN\username]:
Password []:
Authenticating user.
Negotiating security policies.
I then get my customers standard welcome message and am connected.
lancer une application graphique en root (Ubuntu 6.06)
07 août 2006
Flash 8 sous Ubuntu 6.06
$ sudo apt-get install wine
$ wine Firefox\ Setup\ 1.5.0.4.exe
Ceci fait, installez le player Flash 8 :
$ wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe
$ wine install_flash_player.exe
Si l'installeur vous demande de spécifier le répertoire d'installation du plugin pour Firefox, précisez c:\Program files\Mozilla Firefox\plugins
.
16 juin 2006
Configuration du client OCS-ng sous fenêtre brevetée
13 avril 2006
05 avril 2006
Installation de Nessus sur Ubuntu PPC 5.10
répondre aux questions pour créer certificats du serveur
ensuite nessus-adduser et répondre aux questions pour créer un utilisateur
ensuite http://www.nessus.org/register/
et on reçoit par mail un code pour pouvoir mettre à jour les plugins:
rentrer la commande suivante:
/usr/bin/nessus-fetch --register 9DA0-8F51-F3FF-XXXX-XXXX
lancer le serveur :
sudo nessusd -D
mettre à jour les plugins:
sudo nessus-update-plugins -v
(long à démarrer)
lancer un client:
nessus
et le vrai boulot peut commencer...
Configuration NVIDIA sous Red Hat ES 4
puis arrêter le serveur X: init 3
lancer le script récupéré chez NVIDIA
quand c'est fait
system-config-display
S'il ne prend pas la résolution souhaitée on peut avoir besoin de la commande:
xrandr -s 0 (ou un autre nombre relatif à une autre résolution)
man xrandr si nécessaire
Vieux dicton: si l'interface graphique fait aisément et joliment ce qu'elle veut, la ligne de commande exécutera ta commande et rien d'autre.
11 mars 2006
SSH avec authentification par clef privée/publique
Prérequis la connexion ssh avec mot de passe fonctionne.
Sur le client (PBJH) il faut entrer les commandes suivantes:
PBJH:~ hanoteau$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/hanoteau/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/hanoteau/.ssh/id_dsa.
Your public key has been saved in /Users/hanoteau/.ssh/id_dsa.pub.
The key fingerprint is:
XX:XX:XX................................. hanoteau@PBJH.local
PBJH:~ hanoteau$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/hanoteau/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/hanoteau/.ssh/id_rsa.
Your public key has been saved in /Users/hanoteau/.ssh/id_rsa.pub.
The key fingerprint is:
XX:XX:XX:................................. hanoteau@PBJH.local
PBJH:~ hanoteau$ cd .ssh
PBJH:~/.ssh hanoteau$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub known_hosts
PBJH:~/.ssh hanoteau$ scp *.pub 10.0.0.7:/home/hanoteau
Password:
id_dsa.pub 100% 609 459.6KB/s 00:00
id_rsa.pub 100% 229 213.5KB/s 00:00
PBJH:~/.ssh hanoteau$
Ensuite sur le serveur (ip 10.0.0.7):
hanoteau@debianvdr:~$ cd /home/hanoteau
hanoteau@debianvdr:~$ mkdir .ssh
hanoteau@debianvdr:~$ cp *.pub .ssh/
hanoteau@debianvdr:~$ cd .ssh
hanoteau@debianvdr:~/.ssh$ ls
id_dsa.pub id_rsa.pub
hanoteau@debianvdr:~/.ssh$ cat id_dsa.pub >> authorized_keys
hanoteau@debianvdr:~/.ssh$ cat id_rsa.pub >> authorized_keys
Désormais on se connecte sans mot de passe depuis le compte hanoteau de PBJH sur le compte hanoteau de debianvdr avec ssh:
PBJH:~ hanoteau$ ssh 10.0.0.7
Linux debianvdr 2.6.15-1-686 #2 Thu Feb 23 05:41:01 CET 2006 i686 GNU/Linux
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Sat Mar 11 17:11:00 2006 from pbjh.lan
hanoteau@debianvdr:~$
07 mars 2006
Installation ntop à partir du cvs sur ubuntu 5.10
user# mkdir cvsntop
user# cd cvsntop
us# export CVSROOT=:pserver:anonymous@cvs.ntop.org:/export/home/ntop
user# cvs login
Logging in to :pserver:anonymous@cvs.ntop.org:2401/export/home/ntop
CVS password:
user# cvs checkout ntop
cvs checkout: Updating ntop
U ntop/AS-list.txt.gz
U ntop/AUTHORS
....
Quelques dizaines de minutes plus tard on peut commencer le vrai travail d'installation:
If you want to program with C/C++ please do the following:
sudo apt-get install build-essential
nous voilà avec un compilateur gcc avec support c++
(apt-get install gcc cpp marche moins bien)
ensuite apt-get install libpcap-dev libgdbm-dev libgd-dev libglib2.0-dev libgdome2-dev libssl-dev libxml-dev libsp-gxmlcpp-dev libgdome2-xslt-dev libwww-dev libgtk1.2-dev libsctp-dev libxml++2.6-dev
./configure --enable-i18n
make
make install
NOTE: ntop can show traffic by AS (Autonomous System) Number
Because this feature consumes a number of MB of memory,
the datafile is not installed by default.
Which, if there is no file - from this or a previous
install - effectively disables the ASN feature.
To install the AS data, type:
# make install-data-as
************************************************************
************************************************************
WARNING: This install created several directories for the ntop
files and databases:
/usr/local/share/ntop
/usr/local/var/ntop
/usr/local/lib/ntop
/usr/local/bin/ntop
This directory MUST be owned by the user
which you are going to use to run ntop.
The command you must issue is something like:
chown -R ntop.ntop /usr/local/share/ntop
chown -R ntop.ntop /usr/local/var/ntop
chown -R ntop.ntop /usr/local/lib/ntop
chown -R ntop.ntop /usr/local/bin/ntop
man chown to check the syntax for YOUR system
la première fois démarrer ntop via
/usr/local/bin/ntop -u ntop
même si on a pas d'invite taper un mot de passe administrateur pour ntop
le retaper quand demandé
pour les fois suivantes démarrer ntop via:
/usr/local/bin/ntop -u ntop -d
firefox
http://localhost:3000/
06 mars 2006
Installation client ocsinventory sur une ubuntu 5.10
tar zxvf XXX.tar.gz
sudo apt-get install libxml-simple-perl libwww-perl libnet-ip-perl
cd le répertoire adéquat
./ocsinventory-installer.pl
répondre aux questions
03 mars 2006
Intégration OCS dans GLPI sur une sarge
sur le site de glpi récupérer glpi-ocs dans la rubrique ressources/plugins
tar zxvf glpi-ocs-v1.0-RC4.tar.gz -C /var/www/apache2-default/glpi/plugins/
ceci devrait être automatique dans les prochaines versions de glpi (1.0 stable par exemple)
Installation ocsinventory-ng sur debian sarge 3.1
Installation du serveur web d'administration de OCSinventory-ng
Télécharger le tar.gz d'ocsinventory-ng
tar -xvzf ~/OCSNG_LINUX_SERVER_1.0-RC2-FINAL.tar.gz
sudo mkdir /var/www/ocsreports
cd ~/OCSNG_LINUX_SERVER_1.0-RC2/ocsreports
su
cp -R * /var/www/ocsreports/
cd /var/www/
chown -R root:root ocsreports/
chmod gou+rx ocsreports ocsreports/css ocsreports/files ocsreports/image/ ocsreports/languages
chown root:www-data ocsreports
chmod gu+w ocsreports
Installation du serveur de communication de ocsinventoryng
su
apt-get install libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl
chown -R root:root ~/OCSNG_LINUX_SERVER_1.0-RC2/ocsinventory-NG
chmod gou+rx OCSNG_LINUX_SERVER_1.0-RC2/ocsinventory-NG
mv OCSNG_LINUX_SERVER_1.0-RC2/ocsinventory-NG /usr/local
apt-get install libapache-mod-perl libapache-mod-php4
version installée de mod_perl par sarge au 1 mars 2006 est 1.999.21-1
si la version est égale ou supérieure à 1.999.22 alors il y a une manip supplémentaire voir manuel...
cd /usr/local/ocsinventory-NG/
vi Ocsinventory_startup.pl
corriger la ligne approchante comme suit:
use lib "/usr/local/ocsinventory-NG";# <= Change this if Ocsinventory.pm is in an other place
vi /usr/local/ocsinventory-NG/apache_config
Corriger la ligne approchante comme ceci:
PerlRequire /usr/local/ocsinventory-NG/Ocsinventory_startup.pl
vi /etc/apache/httpd.conf
ajouter ceci dans le fichier httpd.conf:
#Include fichier de config pour ocsinventory-ng
Include /etc/apache/ocsinventory-ng.conf
cp /usr/local/ocsinventory-NG/apache_config /etc/apache/ocsinventory-ng.conf
mkdir /var/log/ocsinventory-NG
chown -R www-data:www-data /var/log/ocsinventory-NG
/etc/init.d/apache restart
Application du patch
mkdir patchocs
cp OCSNG_PATCH_SERVER_RC2-1.tar.gz patchocs/
cd patchocs
tar -zxvf OCSNG_PATCH_SERVER_RC2-1.tar.gz OCSNG_PATCH_SERVER_RC2-1/
OCSNG_PATCH_SERVER_RC2-1/ocsinventory-NG/ OCSNG_PATCH_SERVER_RC2-1/ocsinventory-NG/Ocsinventory.pm OCSNG_PATCH_SERVER_RC2-1/Ocsinventory.pm_4_mp_since_1.999_22/ OCSNG_PATCH_SERVER_RC2-1/Ocsinventory.pm_4_mp_since_1.999_22/Ocsinventory.pm OCSNG_PATCH_SERVER_RC2-1/ocsreports/ OCSNG_PATCH_SERVER_RC2-1/ocsreports/preferences.php OCSNG_PATCH_SERVER_RC2-1/README cd OCSNG_PATCH_SERVER_RC2-1/ocsinventory-NG
cp Ocsinventory.pm /usr/local/ocsinventory-NG/
cd OCSNG_PATCH_SERVER_RC2-1/ocsreports
cp preferences.php /var/www/ocsreports/
Configuration finale:
firefox
http://localhost/ocsreports
on demande mysql hostname: localhost mysql login: root mysql password: ****** (simple)
entrer une phrase à afficher au lancement d'un agent
si tout ok
http://localhost/ocsreports login/password = admin/admin
pour activer le changement:
/etc/init.d/apache reload
02 mars 2006
Installer glpi sur une Sarge
GLPI - Gestionnaire libre de parc informatique
Librement adapté du texte de Aurel du mardi 23 août 2005 lui-même inspiré de la documention réalisée par JMD)-
Je pars du postulat que vous avez une Debian fonctionnelle sur votre machine. La version de la Debian concernée est la Sarge dite stable.
Installation Apache, PHP et MySQL
Premièrement, installons le serveur WEB Apache (www.apache.org). Comme GLPI est programmé en PHP il est nécessaire d'installer le module permettant à apache d'interpréter du PHP.
En « root » taper (nous considérerons que toutes les lignes de commandes seront saisies en root) :
Debian:~# apt-get install apache2 php4 libapache2-mod-php4
Une série de questions vous seront posées auxquelles vous devrez répondre par l'affirmative (« O ») si vous voulez poursuivre l'installation.
Glpi fonctionne également avec une base de données MySQL (www.mysql.com), c'est pourquoi nous avons besoin d'installer « mysql-server » et les librairies PHP qui vont avec.
Debian:~# apt-get install mysql-server php4-mysql
Avant toute chose, démarrer vos deux serveurs Apache et MySQL :
Debian:~# /etc/init.d/apache2 restart Debian:~# /etc/init.d/mysql restart
Nous avons désormais les logiciels nécessaires pour faire fonctionner GLPI mais il reste encore quelques étapes avant de pouvoir l'utiliser.
Nous devons affecter un mot de passe à l'utilisateur root du serveur MySQL (pour des raisons évidentes de sécurité).
Debian:~# mysqladmin -u root password 'password'
Remplacer le deuxième 'password' par un mot de passe de votre choix. Attention vous allez créer un mot de passe pour le compte « root » (Administrateur) de la base de donnés MySQL. Maintenant nous allons créer la base de données « glpidb » qui sera utilisée par GLPI.
Debian:~# mysql -u root -p
enter password : *******
mysql> create database glpidb;
Nous allons également créer l'utilisateur « glpiuser » (avec son mot de passe) et lui donner les privilèges nécessaires pour qu'il puisse tout faire dans cette base :
mysql> grant all privileges on glpidb.* to glpiuser@localhost identified by
'mot_de_passe_du_glpiuser';
Si vous voulez rendre GLPI accessible dans votre entreprise aux usagers, il faudra en lieu et place de localhost mettre soit une adresse IP soit un nom connu par votre domaine ex : glpi.monentreprise.com.
Si vous souhaitez vous simplifier la vie dans l'administration de vos bases de données, vous pouvez installer phpmyadmin. Il s'agit d'un outil développé en PHP qui s'utilise à l'aide d'un navigateur. Un apt-get phpmyadmin fera encore des miracles (je ne détaille pas ici son installation car ce n'est pas l'objectif principal de cette documentation).
Téléchargement et installation de GLPI
Il faut désormais récupérer la dernière version de GLPI sur le site http://glpi.indepnet.org rubrique "télécharger".
Vous devez ensuite décompresser l'archive dans le répertoire /var/www/apache2-default qu'Apache a crée pour vous (vous pouvez supprimer cette redirection pointant automatiquement dans le répertoire apache2-default en supprimant quelques lignes dans le fichier « apache2.conf » :
Debian:~# tar -xvzf glpi-X.X.X.tar.gz -C /var/www/apache2-default
Si vous allez faire un tour dans le répertoire /var/www/apache2-default vous pourrez observer que
GLPI a créé un répertoire GLPI.
Maintenant, il est nécessaire d'accorder des permissions à certains répertoires pour GLPI puisse
travailler en toute tranquillité :
Debian:~# cd /var/www/apache2-default Debian:~# chown -R www-data glpi
En tapant cette commande Apache (www-data) devient propriétaire des fichiers, répertoires et sous-répertoires.
Configuration de GLPI
Désormais tout se déroule en ligne. Il vous suffit d'aller « visiter » votre dossier
« http://votre_serveur/glpi » par le Web.
Lors de la première connexion à cette adresse, une procédure d'installation pas-à-pas démarre.
L'interface est intuitive, il suffit d'entrer les informations demandées. Une fois que c'est terminé, le
système vous demande l'identification que vous avez indiquée et vous pouvez commencer à utiliser
GLPI.
En cas de grosse erreur (du genre : vous avez oublié votre propre accès à GLPI...), pour « relancer »
cette procédure d'installation, il suffit d'effacer le fichier suivant :
glpi/config/config_db.php
La connexion suivante dans le dossier « http://votre_serveur/glpi » relancera alors la procédure de configuration (en réalité, c'est l'absence de fichier « config_db.php » qui provoque le lancement de cette procédure).
Attention, si vous avez ce message à l'installation « Vous devez compiler votre PHP avec l'extension MySQL », cela voudra dire que vous devrez faire une modification dans le fichier « /etc/php4/apache2/php.ini ».
En dessous de la rubrique « ;Dynamic Extensions ; », décommenter la ligne ci-dessous en enlevant le « ; » en début de ligne.
extension=mysql.so
Maintenant n'oubliez pas de redémarrer votre serveur Apache2 pour qu'il prenne en compte votre modification.
22 février 2006
Samba et fstab (montage automatique au démarrage
//stonegiga/partage /home/hanoteau/mnt/stonegiga/partage smbfs rw,user,uid=1000,gid=1000,credentials=/etc/samba/pub.cred 0 0
user = n'importe quel utilisateur peut monter et démonter le partage
uid,gid = à qui appartient le partage (par défaut root.root avec les droits 755 donc un utilisateur ne peut écrire par défaut dans le partage)
credentials = on met pas l'utilisateur et le mot de passe en clair dans fstab mais dans un fichier /etc/samba/pub.cred (protégé en lecture lui)
le fichier pub.cred contient:
username=utilisateurdupartage
password=motdepasseassocie
non utilisé ici mais utile:
umask = défini le masque des permissions des fichiers dans le partage
iocharset : si les accents des fichiers des systèmes de fichiers montés (partage samba, CD-ROM) ne s’affichent pas correctement, éditez le fichier
/etc/fstab
et rajoutez iocharset=iso8859-1
iocharset=iso8859-15 (avec symbole euro)
dans la colonne options
des systèmes de fichiers concernés :
21 février 2006
Anti-virus
1) je récupère mes données avec un CD Knoppix (on démarre sur le CD et on a accès à ses disques).
2) je fais tourner un anti-virus depuis Knoppix (clamav) ou un autre CD avec une distribution live de Linux genre bitdefender live CD (les étapes 1 &2 peuvent être inversées et/ou combinées).
3) j'installe un OS qui n'est pas touché par les virus à l'heure actuelle (Linux, FreeBSD, etc...) afin d'éviter ces manoeuvres fastidieuses à l'avenir. Pour vous aider à choisir la bonne distribution un test en anglais en ligne ou me contacter.
Si vous souhaitez absolument jouir des prochains virus vous devez utiliser un OS bien connu des instances européennes en matière d'abus de position dominante. Pour limiter l'apparition spontanée de trop nombreux virus l'installation d'un anti-virus est nécessaire mais rassurez-vous il en passera quand même l'un ou l'autre avec le temps.
Une solution basée sur des logiciels open-source existe:
ClamWin AntiVirus, Winpooch et Winsock Firewall ou WIPFW
Selon ce que j'ai lu les anti-virus suivants sont relativement efficaces:
Avsat (Linux, MacOSX, µ$) gratuit pour utilisation personnelle www.avast.com
AVG (Linux, µ$) gratuit (en anglais) pour usage personnel ou non lucratif free.grisoft.com
Aussi disponible en version d'évaluation seulement: F-secure Antivirus, Kaspersky Antivirus version 5, NOD 32.
09 février 2006
Kismac GPS
Les coordonnées de Mons (longitude, latitude) sont les suivantes:
50°27' 50.45 3°56' 3.93 15m44s 7000 MONSToutes les coordonnées des différentes localités belges sur:
http://www.astro.ulg.ac.be/~sal/post7.htm
01 février 2006
Envoi d'un courriel en ligne de commande (bash)
blablabla
[ ctrl-d ]
Cc: [entrée ]
31 janvier 2006
ocsinventory client installation sous ubuntu 5.10
OCS-NG_LINUX_AGENT_1.0-RC1.tar.gz
sur http://ocsinventory.sourceforge.net
décompresser dans un répertoire de votre choix
Installation des librairies requises:
sudo apt-get ou synaptic pour:
libxml-simple-perl
libcompress-zlib-perl
libcrypt-ssleay-perl # facultatif?
libnet-ip-perl
libwww-perl
lancer le script perl depuis ce répertoire:
sudo ./ocsinventory-installer.pl
ensuite, pour mettre à jour (à l'installation on peut choisir auto update):
sudo ./ocsinventory-client.pl
18 janvier 2006
Samba en mode graphique
installer linneigborhood & mc
Pour plus de facilité dans un terminal taper:
cd /usr/bin
sudo chmod +s smbmnt
chmod +s smbumount
lancer l'application via:
user@machine:~$ LinNeighborhood
et puis c'est du graphique soit avec mc soit via votre navigateur de fichiers (nautilus)
les partages sont montés dans votre répertoire home
Par exemple le partage networking sur la machine stonegiga si vous êtes l'utilisateur pasdebrevetlogiciel se trouvera dans:
/home/pasdebrevetlogiciel/mnt/stonegiga/networking
Ne pas oublier de démonter le partage!!!
11 janvier 2006
Samba en ligne de commande
Coté client:
apt-get install smbclient
smbclient //nom_netbios/nom_partage -U user_name
le mot de passe est demandé
On utilise des commandes à la ftp sur le partage distant
dir ou ls : pour lister le contenu du repertoire
cd: pour changer de répertoire sur le partage distant
lcd: pour changer de répertoire local
get: permet de récuperer un fichier du répertoire distant
put: permet de poser un fichier sur le répertoire distant
del: permet d’effacer un fichier sur le partage distant
md ou mkdir: permet de créer un répertoire sur le partage distant
rd ou rmdir: permet d’effacer un répertoire sur le partage distant
exemple :
user@linuxbox:~/legal$ smbclient //stonegiga/networking -U networking
Password:
Domain=[STONEGIGA] OS=[Unix] Server=[Samba 3.0.2a]
smb: \> cd janus
smb: \janus\> cd fromJH
smb: \> put gpl.txt
librement condensé à partir de http://doc.ubuntu-fr.org/applications/samba/outils
On peut aussi monter le partage et puis y accéder via nautilus ou autre application équivalente:
smbmount //stonegiga/partage /root/partage -o username=usersamba%passwdsamba
09 janvier 2006
Client vpn sous ubuntu 5.10
installation: apt-get install vpnc
configuration dans /etc/vpnc/example.conf
que l'on recopiera dans /etc/vpnc/vpnc.conf
on ouvre la connexion via sudo /usr/sbin/vpnc /etc/vpnc/vpnc.conf
on demandera alors un mot de passe
exemple de configuration si on veut se connecter à un routeur Cisco:
IPSec gateway 1.1.1.1
IPSec ID groupeclient
IPSec secret presharedkey
Xauth username jerome
pour info le fichier d'exemple fourni est assez explicite:
IPSec gateway 192.0.2.32
IPSec ID myGroup
IPSec secret myGroupPWD
Xauth username myUserName
# OPTIONAL
# ========
#
#
# Varios options not undestood by vpnc itself but by some other scripts
#
# Target networks 123.234.210.0/24 10.1.0.0/16
# If Target networks is defined here, the default route is not replaced!
# Don't update resolv.conf though resolvconf is installed
# DNSUpdate no
05 janvier 2006
Win2K in qemu under Ubuntu x86 5.10
(based on various documents coming mainly from www.ubuntuforums.org especially a post from Fredrik Lunde from Norway many thanks to him)
You need a Windows Install CD and the appropriate license from a Redmond company to do so.
In this little howto we will guide you through how to set up the free emulator that I have tested with win2000 professional.
Before we start:
Guest = Your Operating System installed in the emulator
Host = In this case, Ubuntu 5.10
Do this at your own risk, there are know problems with different graphic cards, refresh rate and color settings.
If you notice any flickering on the screen when you change the screen resolution on the guest OS, try to shutdown first the guest, then completely reboot the host. if still it is flickering, there are probably something wrong with your graphic drivers or settings in the Xorg file.
I did this with an Ubuntu upgraded to 5.10 with 2.6.12-10 i386 kernel and 1024 MB memory.
Please note that you preferably have some gigabites available while setting this up. I recommend taking some backups of both the guest and the host while configuring this.
Qemu (GPL) with KQemu (Free as beer but not GPL!)
Virtual Machine for every thing you dream of GNU/Linux or BSD based OS's or need Win2000 or WinXP.
Note: This is what we will go through here. I tried this with Win2000, CentOS4 and will continue to try different OS's here. It is not as fast as VMware with Win2000, but it's a very good free alternative and not so slow.
OK.. Let's start...
Step 1. RUNNING QEMU WITH WIN98
If you are just installing Win98, with the current version (qemu-0.8.0) KQemu will not work anyway, so you don't need to install it.
Win98 only, Just do:
$ apt-get install qemu
...and jump to step 2
If you deside to install Qemu with the KQemu accelerator you just need to start win98 with the extra command -no-kqemu , we will get back to this later anyway.
Step 1. RUNNING QEMU WITH KQEMU ACCELERATOR
Some of this information I ripped from: Nano Florestan at http://oui.com.br/n/content.php?article.21 a lot of the credits should go to him.
First we need to remove any previously installed Qemu and compile it with Kqemu
$ sudo apt-get remove qemu
Go to: http://fabrice.bellard.free.fr/qemu/download.html
...and download these 2 files:
1) QEMU source code (Not the binary for i386)
2) QEMU Accelerator Module
0.8.0 is the current version (5rd January 2006).
$ tar zxvf qemu-0.8.0.tar.gz
The Kqemu shall be unpacked into a subdirectory of the new qemu-0.8.0 directory
$ cd qemu-0.8.0
$ tar zxvf /location of downloaded files/kqemu-0.7.2.tar.gz
NOTE: Some people have reported permission errors during installation, the following command will correct the problem.
$ sudo chmod -R 775 /path/to/qemu-0.8.0
You now need to make sure you have some extra packets. First make sure you have the kernel headers installed by:
$ uname -r
..this will output the kernel version
Open Synaptic package manager and search for packages called "linux-headers". Several packages start with this name. Install the one that corresponds to your processor and your kernel version.
Still in Synaptic, choose the package you have just installed, click Properties and go to the "Installed Files" tab. Write down the directory where the files were copied (looks like /usr/src/linux-headers-2.6versionnumber/)
$ vi configure (or another editor e.g. gedit if you prefer GUI)
change the: kernel_path="/usr/src/linux-headers-2.6.12-10" (adapt it)
$ sudo apt-get install libsdl1.2-dev
$ sudo apt-get install zlib1g-dev
Then check that everything is correct with:
$ ./configure
If everything is correct and you recieve no errors, proceed with:
$ make
Correct output to make will go on and on and output a lot of text...
If you did'nt get any errors you are now ready to install. If you get any errors or this does'nt work at all, make sure you have a gcc compiler in your system.
By default Ubuntu is not installed with gcc so there is a high probability that you need to install it through apt or synaptic. Choose the 3.4 version of gcc not the 4.0 or superior there are some problems with qemu and 4.0 version of gcc. Also do a link between gcc and gcc-3.4 like this ln -s /usr/bin/gcc-3.4 /usr/bin/gcc
Now we are ready to install:
Note: Please check AgenT's suggestion of doing checkinstall instead of make install: http://www.ubuntuforums.org/showthre...873#post200873
$ sudo make install
If everything went ok, you can now start the qemu with the command
$ sudo modprobe kqemu
Then we need to make this start when the computer boots
$ sudo vi /etc/init.d/bootmisc.sh (or another editor...)
Add these lines to the end just before "exit;"
# Start Qemu with KQemu accelerator
/sbin/modprobe kqemu
mknod /dev/kqemu c 250 0 # Create the KQEMU device
chmod 666 /dev/kqemu # Make it accessible to all users
Step 2. MAKING A VIRITUAL DISK WITH QEMU
First create a directory for the guest OS's. This should be done as the user you will use while running the guest OS
$ cd /home/your username
$ mkdir Qemu
$ cd Qemu
Then we will create the virtual hard drive, in my case for Win2k I used 8 gigabyte for Win2000. We set the size with the (amount)M
$ qemu-img create hd.img 8000M
But there is a known bug with Win2K (only one? ;o) ) so create it rather with:
$ dd if=/dev/zero of=hd.img bs=4096 count=2000000
Otherwise you can have a not space enough place on c: error after a 2 hours installation process (High frustration level guaranted believe me especially at the third attempt in a row).
Step 3. INSTALLING THE GUEST OS
So... we now have the disk and need to install something on it..
first lets have a look at the options for booting with Qemu
-boot gives the parameter of which device to boot from.
a = floppy
d = cdrom
c = hard drive
-fda /dev/fda
will tell qemu where to find the floppy drive
-fda /path/to/your/bootdisk.img
will tell qemu to boot from a bootdisk image. You can download images from www.bootdisk.com
PS: you can download an .exe bootdisk extractor and open it with Archive Manager and extract the bootdisk image
-cdrom /dev/cdrom
will tell qemu where to find the cdrom drive.
-cdrom /path/to/your/install_cd.iso
will tell qemu to use an iso instead of your cdrom drive.
-hda /path/to/your/new/viritual/hd.img
Will tell qemu which viritual harddrive to use. you can also use secondary drive with -hdb /path/to/your/new/viritual/secondary/hd.img
So here we go... If we have a bootable install cd and just want to use the cdrom drive, this is how it goes:
$ qemu -win2k-hack boot d -cdrom /dev/cdrom -hda hd.img
If you need to start with different parameters, just modify and add to the end. If you install Win98, dont forget to add -no-kqemu at the end.
Alternatively you can first copy the cdrom on the hard disk (quicker?)
$ dd if=/dev/cdrom of=win2000.iso(When the installation ask you to reboot, change the -boot d flag to -boot c for the virtual hard drive) seems not to be necessary.
Proceed to installation via:
$ qemu -win2k-hack -boot d -cdrom win2000.iso -hda hd.img
Step 4. STARTING THE GUEST OS
Well.. we're sort of already there, again it's mostly just to change the -boot flag
$ qemu -boot c -cdrom /dev/cdrom -hda hd.img -m 256 -k fr-be &
Description of other flags used in this startup:
-k fr-be
Keyboard layout.. works with some languages (not needed but can't be bad to specify it see qemu man for further explanations)
-m 256
Amount of memory provided the guest OS
Note: I will not go into details about networking here.. at least not yet. Internet should probably work from the guest without any modifications. To set up shared folders between the guest and the host, a tip is. Install samba, then share the folders with SMB and add the flag -smb /shared/folder to your startup command.
Step 5. PERFORMANCE TWEAKING THE GUEST OS
Before you start tweaking the guest OS.. just copy the hd.img
$ cp hd.img hd.img.backup
Now find a good performance tweek site on the net for removing all unwanted processes for your OS
Win2000: http://www.techspot.com/tweaks/win2k...es/print.shtml
EDIT: Additional information from sebdah
For you guys who wants to tweak WinXP: Check TweakXP.com, it should be everything you need!
Step 6. CREATING A LAUNCER
Now finally you may want a launcher for your new OS..
Rightclick on the panel where you want to create the launcher and choose:
(The panel is the bar at the top of your screen)
Add to Panel > Custom Application Launcher >
Name: win2000 (or something else devil2k?)
Command: qemu -boot c -cdrom /dev/cdrom -hda /path/to/your/hd.img -m 256 -k fr-be &
Choose an icon for you new OS
Note: modify the command starter after your needs.
About networking
By using the option `-net user' (default configuration if no `-net' option is specified), QEMU uses a completely user mode network stack (you don't need root priviledge to use the virtual network). The virtual network configuration is the following:
QEMU VLAN <------> Firewall/DHCP server <-----> Internet
| (10.0.2.2)
|
----> DNS server (10.0.2.3)
|
----> SMB server (10.0.2.4)
The QEMU VM behaves as if it was behind a firewall which blocks all incoming connections. You can use a DHCP client to automatically configure the network in the QEMU VM. The DHCP server assign addresses to the hosts starting from 10.0.2.15.
In order to check that the user mode network is working, you can ping the address 10.0.2.2 and verify that you got an address in the range 10.0.2.x from the QEMU virtual DHCP server.
Note that ping
is not supported reliably to the internet as it would require root priviledges. It means you can only ping the local router (10.0.2.2).
When using the built-in TFTP server, the router is also the TFTP server.
When using the `-redir' option, TCP or UDP connections can be redirected from the host to the guest. It allows for example to redirect X11, telnet or SSH connections.
CHANGING CD'S IN THE GUEST
Some people have reported problems changing CD's while running the guest OS.
rcerreto has posted a solution here:
http://ubuntuforums.org/showpost.php...&postcount=256
LINKS TO USEFULL INFORMATION
http://fabrice.bellard.free.fr/qemu/index.html
http://fabrice.bellard.free.fr/qemu/qemu-doc.html
http://www.debian-administration.org/?article=40
http://oui.com.br/n/content.php?article.21
http://www.carlsonhome.net/computer_help_log.php
Free Operating System Zoo
http://free.oszoo.org/
Have fun... and report me with any error confusion or other problem (copyright or other)