8 nov. 2012

FusionDirectory 1.0.4


Technologie FusionDirectory 1.0.4

Posté par  (page persojabber id. Modéré par Pierre JarillonLicence CC by-sa
20
7
nov.
2012
Technologie
L’équipe de FusionDirectory est heureuse de vous annoncer la publication de la version 1.0.4 de FusionDirectory. Pour ceux qui ne connaissent pas cet outil, sachez qu’il s’agit d’un gestionnaire d’infrastructure. Il vous permet de gérer via une interface Web :
  • les utilisateurs : UNIX, Samba, informations administratives ;
  • les groupes : UNIX, Samba ;
  • les services : SMTP, IMAP/POP, DHCP, HTTP, dépôts Debian, DNS, antivirus, Asterisk ;
  • les serveurs : déploiement via FAI/OPSI et paramétrage ;
  • les postes clients : déploiement système et applications.
Logo FusionDirectory
Plus de détails sur cette version 1.0.4 dans la suite de la dépêche.
La version 1.0.4 apporte son lot de corrections de bogues de la version 1.0.3, soit un nouveau framework « simple‐plugin » pour la création des greffons, un nouveau greffon et de nouvelles fonctionnalités.

Nouveau framework

Simple Plugin est la nouvelle façon d’écrire des greffons pour FusionDirectory. Il est désormais obligatoire et a été utilisé pour écrire les greffons Password Recovery et Board. Ce nouveau framework permet d’écrire des greffons de manière simple et lisible, en se concentrant sur ce que l’on veut faire et non sur le code à écrire.

Nouveau greffon

Board, est un petit tableau de bord pour FusionDirectory.
Capture d'écran du plugin Board

Autres nouveautés marquantes

  • gestion de PHP 5.4Smarty 3 et gettext ;
  • suppression de la dépendance mdb2.php pour le cœur du logiciel ;
  • retrait du code opsi obsolète des greffons ;
  • l’espagnol, le vénézuélien et le néerlandais sont maintenant gérés ;
  • guide d’aide à la réalisation d’un greffon avec le framework simple plugin ;
  • adresse de courriel secondaire pour la récupération du mot de passe ;
  • création de PC Windows à partir de l’interface ;
  • visualisation de l’adresse MAC à côté de l’adresse IP dans la liste des systèmes ;
  • ajout de quelques attributs à l’objet imprimante pour Windows dans le cadre d’une utilisation avec opsi ;
  • mise à jour des fichiers LDIF recovery.ldifgoto.ldifgoserver.ldiffdQuota.ldif et argonaut.ldif.

5 nov. 2012

Simplify Your Life With an SSH Config File


Simplify Your Life With an SSH Config File

by jperras

If you’re anything like me, you probably log in and out of a half dozen remote servers (or these days, local virtual machines) on a daily basis. And if you’re even more like me, you have trouble remembering all of the various usernames, remote addresses and command line options for things like specifying a non-standard connection port or forwarding local ports to the remote machine.

Shell Aliases

Let’s say that you have a remote server named dev.example.com, which hasnot been set up with public/private keys for password-less logins. The username to the remote account is fooey, and to reduce the number of scripted login attempts, you’ve decided to change the default SSH port to 2200 from the normal default of 22. This means that a typical command would look like:
ssh fooey@dev.example.com -p 22000
password: *************
Not too bad.
We can make things simpler and more secure by using a public/private key pair; I highly recommend using ssh-copy-id for moving your public keys around. It will save you quite a few folder/file permission headaches.
ssh fooey@dev.example.com -p 22000
# Assuming your keys are properly setup...
Now this doesn’t seem all that bad. To cut down on the verbosity you could create a simple alias in your shell as well:
alias dev='ssh fooey@dev.example.com -p 22000'
# To connect:
$ dev
This works surprisingly well: Every new server you need to connect to, just add an alias to your .bashrc (or .zshrc if you hang with the cool kids), and voilà.

~/.ssh/config

However, there’s a much more elegant and flexible solution to this problem. Enter the SSH config file:
# contents of $HOME/.ssh/config
Host dev
    HostName dev.example.com
    Port 22000
    User fooey
This means that I can simply  $ ssh dev, and the options will be read from the configuration file. Easy peasy. Let’s see what else we can do with just a few simple configuration directives.
Personally, I use quite a few public/private keypairs for the various servers and services that I use, to ensure that in the event of having one of my keys compromised the dammage is as restricted as possible. For example, I have a key that I use uniquely for my github account. Let’s set it up so that that particular private key is used for all my github-related operations:
Host dev
    HostName dev.example.com
    Port 22000
    User fooey

Host github.com
    IdentityFile ~/.ssh/github.key
The use of IdentityFile allows me to specify exactly which private key I wish to use for authentification with the given host. You can, of course, simply specify this as a command line option for “normal” connections:
 $ ssh -i ~/.ssh/blah.key username@host.com
but the use of a config file with IdentityFile is pretty much your only optionif you want to specify which identity to use for any git commands. This also opens up the very interesting concept of further segmenting your github keys on something like a per-project or per-organization basis:
Host github-project1
    User git
    HostName github.com
    IdentityFile ~/.ssh/github.project1.key

Host github-org
    User git
    HostName github.com
    IdentityFile ~/.ssh/github.org.key

Host github.com
    User git
    IdentityFile ~/.ssh/github.key
Which means that if I want to clone a repository using my organization credentials, I would use the following:
git clone git@github-org:orgname/some_repository.git

Going further

As any security-conscious developer would do, I set up firewalls on all of my servers and make them as restrictive as possible; in many cases, this means that the only ports that I leave open are 80/443 (for webservers), and port 22 for SSH (or whatever I might have remapped it to for obfuscation purposes). On the surface, this seems to prevent me from using things like a desktop MySQL GUI client, which expect port 3306 to be open and accessible on the remote server in question. The informed reader will note, however, that a simple local port forward can save you:
ssh -f -N -L 9906:127.0.0.1:3306 coolio@database.example.com
# -f puts ssh in background 
# -N makes it not execute a remote command
This will forward all local port 9906 traffic to port 3306 on the remotedev.example.com server, letting me point my desktop GUI to localhost (127.0.0.1:9906) and have it behave exactly as if I had exposed port 3306 on the remote server and connected directly to it.
Now I don’t know about you, but remembering that sequence of flags and options for SSH can be a complete pain. Luckily, our config file can help alleviate that:
Host tunnel
    HostName database.example.com
    IdentityFile ~/.ssh/coolio.example.key
    LocalForward 9906 127.0.0.1:3306
    User coolio
Which means I can simply do:
ssh -f -N tunnel
And my local port forwarding will be enabled using all of the configuration directives I set up for the tunnel host. Slick.

Homework

There are quite a few configuration options that you can specify in~/.ssh/config, and I highly suggest consulting the online documentation or the ssh_config man page. Some interesting/useful things that you can do include: change the default number of connection attempts, specify local environment variables to be passed to the remote server upon connection, and even the use of * and ? wildcards for matching hosts.
I hope that some of this is useful to a few of you. Leave a note in the comments if you have any cool tricks for the SSH config file; I’m always on the lookout for fun hacks.

The State of Open-Source Monitoring

Source : https://speakerdeck.com/obfuscurity/the-state-of-open-source-monitoring

23 sept. 2011

CHKROOTKIT - installation

Chkrootkit est un outil permettant de détecter les traces d'une attaque et rechercher la présence d'un rootkit sur un système Unix/Linux en vérifiant les quelques points suivants:) sont présent.
- si des fichiers exécutables du système ont été modifiés
- si la carte réseau est en mode "promiscuous"
- si un ou des vers LKM (Linux Kernel Module) sont présent.

PRE REQUIS
GCC est nécessaire pour l’installation de chkrootkit. Il faut donc l’installer:
#yum install gcc




INSTALLATION
#cd /usr/local
#wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
#tar zxvf chkrootkit.tar.gz
#rm -f chkrootkit.tar.gz
#cd chkrootkit-0.48
#make sense
#ln -s /usr/local/chkrootkit-0.48/chkrootkit /usr/sbin/chkrootkit

CONFIGURATION DU REPORTING
Dans /etc/cron.weekly/

Créer le fichier chkrootkit.sh contenant:

#!/bin/bash
chkrootkit > /tmp/chkrootkit-`date +%Y%m%d`.log 2>&1 cat /tmp/chkrootkit-`date +%Y%m%d`.log | mail -s "[CHKROOTKIT] $HOSTNAME: Rapport" toto@ladmin.com

BASH - taille de l'historique et affichage

1.    INTRODUCTION

1.1.    Présentation
Cette procédure indique les manières dont on peut contrôler la taille de l'historique ainsi que sont affichage.

1.2.    Champ d'application
Tout serveur Unix étant muni d'un Bourne Shell (BASH).


2.    APPLICATION DES MODIFICATIONS
Les modifications qui suivent sont à indiquer dans le fichier .bashrc ou .bash_profile de l'utilisateur dont on veut récupérer l'historique.
2.1.    Taille de l'historique
Est gérée par les variables : HISTFILESIZE et HISTFILE.
Etendue de l'historique à 10000, au lieu de 500 par défaut.

HISTFILESIZE=10000

2.2.    Affinage de l'affichage
Nous voulons afficher la date et l'heure des commandes passées.

HISTTIMEFORMAT="[%Y%m%d-%H:%M:%S]"





SSH - Clé publique/privée

1.    PRESENTATION

Face au problème d’hétérogénéité des mots de passe root, nous avons souhaité par soucis de rapidité dans nos tâche d’administration, mettre en place un système d’authentification par clé.
L'authentification par clé fonctionne grâce à 3 composants :
•    Une clé publique : elle sera exportée sur chaque hôte sur lequel on souhaite pouvoir se connecter.
•    Une clé privée : elle permet de prouver son identité aux serveurs.
•    Une passphrase : Permet de sécuriser la clé privée (notons la subtilité, passphrase et pas password ... donc « phrase de passe » et non pas « mot de passe »).
La sécurité est vraiment accrue car la passphrase seule ne sert à rien sans la clé privée, et vice-versa. Cependant, nous utiliserons une passphrase vide ce qui ne constitue pas un trou de sécurité. En effet, les clés en elle-même ont déjà un indice de sécurité plus important que l’authentification par mot de passe.


2.    SERVEUR
Les actions à mener sur le serveur ssh sont les suivantes :
Package à installer :
•    openssh-server
Configuration :
Vérifié la présence des valeurs suivantes dans le fichier /etc/ssh/sshd_config :
HostKey /etc/ssh/ssh_host_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
StrictModes yes
AuthorizedKeysFile      .ssh/authorized_keys
Vérifié les droits sur les répertoires :
700 sur /root/.ssh
644 sur /root/.ssh/authorized_keys

3.    CLIENT
Les actions à mener sur le client ssh sont les suivantes :
Si le jeu de clé n’est pas crée la commande ci-dessous permettra sa création. Sinon nous utiliserons le jeu de clé existant.
Pour savoir si un jeu de clé existe, il faut vérifier que les fichiers suivant sont présent:
/root/.ssh/id_rsa et /root/.ssh/id_rsa.pub
Ou
 /root/.ssh/id_dsa et /root/.ssh/id_dsa.pub
Pour crée la paire de clé :
ssh-keygen -b 2048 -t dsa
On copie ensuite la clé publique sur le serveur :
scp root@bruns:/root/.ssh/id_dsa.pub /root/.ssh/
cd /root/.ssh
cat id_dsa.pub >> authorized_keys
rm –rf id_dsa.pub

4.    CONNEXION PAR CLE
Pour ce connecté il suffit désormais de taper la commande suivante :
ssh root@serveur
ssh root@ip

IRIX, installer un package

How do I install a package on IRIX?
Open source comes in .tardist extension files. tardist files are tar archives of inst (SGI auto-install) files. They normally install automatically when you click on them in your browser. If you didn't have auto-installation configured in your browser this may fail, in which case you may follow the following manual procedure:
    % tar xvf xxxx.tardist    # untar that tardist file
    % su            # become superuser
    # inst -f .            # install from current dir
    inst> go
    inst> quit
Automating this process:
The utility tardist does all the above automatically. To configure your browser to support auto-install (i.e. calling tardist or SoftwareManager automatically when you click on a .tardist file on the web) you should have two entries added to your mailcap file (either your personal ~/.mailcap or, depending on your browser version, the system one in /var/netscape/.../mailcap, /usr/local/.../mailcap, or equivalent).
    application/x-install; \
    /usr/sbin/SoftwareManager -a -F %s ; \
    description="SGI automatic software installation"
    application/x-tardist; \
    /usr/sbin/SoftwareManager -a -f %s ; \
    description="SGI software distribution archive"
All this should work out of the box on recent IRIX releases. It is just on older IRIX systems (6.2) that you may need to go through the manual procedure.


Cf. http://freeware.sgi.com/faq.html

Différences majeures entre Red Hat 6, 7, 8 et 9

Quelles sont les différences majeures entre RHEL 6, 7, 8 et 9 ? Système de fichiers RHEL 6: Par défaut : ext4. Autres : ext2, ext3 supportés...