[slapd.d] bdb_equality_candidates – not indexed

Logcheck me remonte ceci :

Apr  2 16:02:04 host slapd[30343]: <= bdb_equality_candidates: (memberUid) not indexed
Apr  2 16:02:04 host slapd[30343]: <= bdb_equality_candidates: (uid) not indexed
Apr  2 16:02:04 host slapd[30343]: <= bdb_equality_candidates: (cn) not indexed
Apr  2 16:02:46 host slapd[30343]: <= bdb_equality_candidates: (uid) not indexed
Apr  2 16:02:46 host slapd[30343]: <= bdb_equality_candidates: (memberUid) not indexed
Apr  2 16:09:16 host slapd[30343]: <= bdb_equality_candidates: (uid) not indexed
Apr  2 16:09:16 host slapd[30343]: <= bdb_equality_candidates: (memberUid) not indexed
Apr  2 16:12:19 host slapd[30343]: <= bdb_equality_candidates: (uid) not indexed
Apr  2 16:20:16 host slapd[30343]: <= bdb_equality_candidates: (uid) not indexed

La démarche est donc de faire indexer à slapd les champs uid, memberUid & cn

Si vous ne l’avez pas fait éditer le fichier /etc/ldap/slapd.d/cn\=config/olcDatabase\=\{0\}config.ldif en ajoutant la ligne olcRootPW sous olcRootDN, le mot de passe est généré avec la commande slappasswd (n’oubliez pas de relancer le daemon slapd)

Pour revenir à notre problème, il faut donc éditer votre schéma via un bon éditeur (type ApacheDirectoryStudio en « cn=admin,cn=config » et le mot de passe, avec le base dn « cn=config ») Puis, dans le chemin : olcDatabase={1}hdb,cn=config ajouter la ligne :

olcDbIndex: uid,memberUid,cn eq

Ménage dans Debian

Après installation d’une debian sur un linutop2 il s’avère que la carte flash de 1Go est un peu petite.. Un peut de ménage s’impose donc parmi les docs, man, langue et autres choses non vitale du système

    aptitude purge man man-db doc-debian doc-debian-fr doc-linux-fr-text doc-linux-text xorg-docs debian-faq info manpages manpages-fr manpages-fr-extra

rm -r /usr/share/man/*
rm -r /usr/share/doc/*
rm -rf /var/lib/apt/lists/security*
rm -rf /var/lib/apt/lists/debian*
rm -f /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin
rm -f /var/lib/dpkg/available-old /var/lib/dpkg/status-old
rm -f /var/cache/debconf/config.dat-old /var/cache/debconf/templates.dat-old
apt-get clean > /dev/null
find /var/lib/apt/lists -type f \( -name "*Packages*" -o -name "*Sources*" -o -name "*Release*" \) -exec rm -f '{}' ';' 2>/dev/null
dpkg --clear-avail > /dev/null
rm -f /var/cache/apt/*.bin > /dev/null
apt-cache gencaches > /dev/null

find /usr/share/locale -name "*.mo" -exec rm '{}' ';' 2>/dev/null
find /usr/share/ -name "*.info.gz" -exec rm '{}' ';' 2>/dev/null
# find /usr/share/locale -path '*/en' -mindepth 1 -maxdepth 2 -prune -o -print -exec rm -rf '{}' ';' 2>/dev/null >/dev/null

aptitude install localpurge

localpurge

rm -f /var/lib/dpkg/info/*.md5sums

mkdir /usr/share/man/man5
mkdir /usr/share/man/man8
mkdir /usr/share/man/man1

Connexion SSH avec clé RSA + passphrase

Pour ce connecter de façon vraiment sécurisé à vos serveur, la clé RSA et la passphrase sont un très bon début…

D’abord générer des clés

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/thouveni/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): ***********************************************
Enter same passphrase again: ***********************************************
Your identification has been saved in /home/thouveni/.ssh/id_rsa.
Your public key has been saved in /home/thouveni/.ssh/id_rsa.pub.
The key fingerprint is:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Ensuite diffuser sa clé publique

$ scp ~/.ssh/id_rsa.pub [user@]host:~/.ssh/authorized_keys2
id_rsa.pub 100% 401 0.4KB/s 00:00

OU

cat $HOME/.ssh/id_rsa.pub | ssh [user@]host "mkdir -p .ssh; chmod 700 .ssh; cat >> .ssh/authorized_keys"

OU

ssh-copy-id [user@]host

Enfin tester la connexion :

$ ssh [user@]host
Enter passphrase for key '/home/user/.ssh/identity':

Valider temporairement sa passphrase :

eval 'ssh-agent'
ssh-add ~/.ssh/id_rsa

Modification de votre passphrase :

ssh-keygen -p

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
5c:9b:16:56:a6:cd:11:10:3a:cd:1b:a2:91:cd:e5:1c.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:1
RSA host key for ras.mydomain.com has changed and you have requested strict checking.
Host key verification failed.

Solution :

ssh-keygen -R IP

Cours, apprentissage de la programmation shell

Pendant très longtemps j’ai chercher un site, un cours sur l’apprentissage du shell mais les moteurs de recherches ne me donnant pas pleine satisfaction, ayant toujours soif de plus plus plus de fonctionnalité, de savoir je commençais à désespérer.. jusqu’au jour ou je suis tomber par hasard sur le Guide avancé d’écriture des scripts Bash et la.. j’ai compris que le petit jésus existait… Donc si comme moi vous êtes une feignasse qui veut tous automatiser apprenez le shell

==> http://abs.traduc.org/

Mémo – Couteau suisse linux

htop : Un top mais en mieux (monitoring en temps réel coloré)

clamtk : Scanner les clés USB de vos utilisateurs Windows Clamtk

grep -E -v '^(#|$)' fic.conf : Décommenter un fichier de conf

trickle : Limite la bande passante d’une application!

cp /etc/apache2/apache2.conf{,.bak} Reviens a faire  cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak

tsocks : Faire passer le flux réseau dans un proxy socks netcat :

nc pour faire du client / serveur en bash

Perlbrew – Perl indépenant du système

PerlBrew permet d’installer une version de Perl indépendante de celle du système ce qui permet d(éviter les conflits entre les scripts maison et les paquets système.

Avec Perlbrew il est possible d’installer Perl dans le HOME d’un utilisateur ou dans un répertoire type /opt/perl5 (ce que nous avons choisie ici)

Note : cpan fonctionne normalement avec Perlbrew

Installation

Environnement

Par défaut Perlbrew s’installe dans $HOME/perl5, nous souhaitons l’installer dans /opt/perl5, il faut donc lui préciser un autre lieu :

 $ export PERLBREW_ROOT=/opt/perl5</pre>
$ cd /opt/perl5
$ curl -k -LO http://xrl.us/perlbrew
$ perl ./perlbrew install
$ rm ./perlbrew
$ /opt/perl5/bin/perlbrew init

Les commandes suivante vont modifier le PATH afin

 $ echo "export PERLBREW_ROOT=/opt/perl5" >> ~/.bashrc
$ echo "source /opt/perl5/etc/bashrc" | tee -a ~/.bashrc

Déconnectez-vous ou relancer la bash. Vous devriez avoir de nouvelles variables d’environnement :

 $ env | grep PATH
PATH=/opt/perl5/bin:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin:/opt/scala/cur/bin:/usr/local/mysql/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/scala/cur/bin
PERLBREW_PATH=/opt/perl5/bin

Installation de perl

 $ perlbrew mirror
# Choisir par exemple : 78 : OVH
$ perlbrew -v install perl-5.14.2 -Dusethreads

Switch perl

Actuellement sur le système perl v5.8.8

 $ perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
 GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
 this system using "man perl" or "perldoc perl".  If you have access to the
 Internet, point your browser at http://www.perl.org/, the Perl Home Page.

On switch sur l’install de perl 5.14.2

$ perlbrew switch perl-5.14.2
$ perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux

Copyright 1987-2011, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
 GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
 this system using "man perl" or "perldoc perl".  If you have access to the
 Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Retour sur la version système :

 $ perlbrew off
perlbrew is turned off.
$ perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
 GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
 this system using "man perl" or "perldoc perl".  If you have access to the
 Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Perl & le CPAN

Installation de CPAN

 $ perlbrew switch perl-5.14.2
$ cpan
# Answer all setup instructions
» o conf commit
» q

Utilisation CPAN

 $ cpanm --interactive -v App::cpanoutdated

Source

  • http://www.perlbrew.pl/
  • http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html
  • http://nxadm.wordpress.com/2010/12/10/get-the-latest-perl-release-with-perlbrew/
  • http://www.perl.org/get.html
  • http://search.cpan.org/~gugod/App-perlbrew-0.39/bin/perlbrew#INSTALLATION

En continuant à utiliser le site, vous acceptez l’utilisation des cookies (au chocolat) Plus d’informations

Les cookies sont utilisés à des fin de statistique de visite du blog sur une plateforme indépendante que j'héberge moi même. Les statistiques sot faites avec un logiciel libre. Aucune information n'est redistribué à google ou autre. Je suis seul autorisé à lire ces informations

Fermer