Skip to content


Authentification des utilisateurs de Trac à un LDAP ou Active Directory : CentOS

Introduction

Ce qu'il faut installer:

yum install -y http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install -y trac
yum install -y subversion mod_dav_svn mod_python python-ldap

Lancer Apache

service httpd restart
chkconfig httpd on

Désactiver selinux :

Editer le fichier /etc/selinux/config et de remplacer la ligne SELINUX=enforcing par

SELINUX=disabled

Télécharger Trac

wget http://download.edgewall.org/trac/Trac-1.0.1.tar.gz
tar xvzf Trac-1.0.1.tar.gz
cp -afvr Trac-1.0.1 /var/www/html/trac
chown -R -c apache: /var/www/html/trac
chmod -R -c 777 /var/www/html/trac

Accepter les connexions

head -n -3 /etc/sysconfig/iptables >> /etc/sysconfig/iptables.tmp
echo "-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT" >> /etc/sysconfig/iptables.tmp
tail -n 3 /etc/sysconfig/iptables >> /etc/sysconfig/iptables.tmp
cp -f /etc/sysconfig/iptables.tmp /etc/sysconfig/iptables
rm /etc/sysconfig/iptables.tmp -f
service iptables restart

Instanciation d'un projet Trac

trac-admin /var/www/html/trac/infra initenv

Installation des plugins

La page :  http://trac-hacks.org/wiki/LDAPAuthPlugin nous indique d'utiliser les deux plugins suivants :

https://trac-hacks.org/wiki/AccountManagerPlugin : accountmanagerplugin_tags_acct_mgr-0.4.3-13337

http://trac-hacks.org/wiki/TracLdapAuthPlugin : tracldapauthplugin-13337

Pour installer ces plugins:

cd rep du plugin dézippé
python ./setup.py bdist_egg && python setup.py install

Comme :

unzip accountmanagerplugin_tags_acct_mgr-0.4.3-13337.zip ; unzip tracldapauthplugin-13337.zip
cd accountmanagerplugin/tags/acct_mgr-0.4.3/
python setup.py compile_catalog -f
python setup.py bdist_egg
python setup.py install
 
cd
cd /tracldapauthplugin/trunk/
python setup.py bdist_egg
python setup.py install

Voici en exemple une sortie de l'installation d'un plugin pour Trac :

python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to TracAccountManager.egg-info/requires.txt
writing TracAccountManager.egg-info/PKG-INFO
writing top-level names to TracAccountManager.egg-info/top_level.txt
writing dependency_links to TracAccountManager.egg-info/dependency_links.txt
writing entry points to TracAccountManager.egg-info/entry_points.txt
reading manifest file 'TracAccountManager.egg-info/SOURCES.txt'
writing manifest file 'TracAccountManager.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running compile_catalog
compiling catalog 'acct_mgr/locale/zh_CN/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/zh_CN/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/tr/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/tr/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/nl/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/nl/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/he/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/he/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/it/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/it/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/ru/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/ru/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/sv/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/sv/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/es/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/es/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/pt_BR/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/pt_BR/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/fi/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/fi/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/pl/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/pl/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/zh_TW/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/zh_TW/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/cs/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/cs/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/fr/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/fr/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/de/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/de/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/id_ID/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/id_ID/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/et/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/et/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/te/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/te/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/uk/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/uk/LC_MESSAGES/acct_mgr.mo'
compiling catalog 'acct_mgr/locale/ja/LC_MESSAGES/acct_mgr.po' to 'acct_mgr/locale/ja/LC_MESSAGES/acct_mgr.mo'
running build_py
copying acct_mgr/locale/zh_CN/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/zh_CN/LC_MESSAGES
copying acct_mgr/locale/tr/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/tr/LC_MESSAGES
copying acct_mgr/locale/nl/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/nl/LC_MESSAGES
copying acct_mgr/locale/he/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/he/LC_MESSAGES
copying acct_mgr/locale/it/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/it/LC_MESSAGES
copying acct_mgr/locale/ru/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/ru/LC_MESSAGES
copying acct_mgr/locale/sv/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/sv/LC_MESSAGES
copying acct_mgr/locale/es/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/es/LC_MESSAGES
copying acct_mgr/locale/pt_BR/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/pt_BR/LC_MESSAGES
copying acct_mgr/locale/fi/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/fi/LC_MESSAGES
copying acct_mgr/locale/pl/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/pl/LC_MESSAGES
copying acct_mgr/locale/zh_TW/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/zh_TW/LC_MESSAGES
copying acct_mgr/locale/cs/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/cs/LC_MESSAGES
copying acct_mgr/locale/fr/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/fr/LC_MESSAGES
copying acct_mgr/locale/de/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/de/LC_MESSAGES
copying acct_mgr/locale/id_ID/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/id_ID/LC_MESSAGES
copying acct_mgr/locale/et/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/et/LC_MESSAGES
copying acct_mgr/locale/te/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/te/LC_MESSAGES
copying acct_mgr/locale/uk/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/uk/LC_MESSAGES
copying acct_mgr/locale/ja/LC_MESSAGES/acct_mgr.mo -> build/lib/acct_mgr/locale/ja/LC_MESSAGES
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/model.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/web_ui.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/db.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/md5crypt.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/pwhash.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/register.py -> build/bdist.linux-x86_64/egg/acct_mgr
creating build/bdist.linux-x86_64/egg/acct_mgr/locale
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/zh_CN
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/zh_CN/LC_MESSAGES
copying build/lib/acct_mgr/locale/zh_CN/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/zh_CN/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/tr
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/tr/LC_MESSAGES
copying build/lib/acct_mgr/locale/tr/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/tr/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/nl
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/nl/LC_MESSAGES
copying build/lib/acct_mgr/locale/nl/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/nl/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/he
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/he/LC_MESSAGES
copying build/lib/acct_mgr/locale/he/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/he/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/it
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/it/LC_MESSAGES
copying build/lib/acct_mgr/locale/it/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/it/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/ru
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/ru/LC_MESSAGES
copying build/lib/acct_mgr/locale/ru/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/ru/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/sv
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/sv/LC_MESSAGES
copying build/lib/acct_mgr/locale/sv/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/sv/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/es
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/es/LC_MESSAGES
copying build/lib/acct_mgr/locale/es/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/es/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/pt_BR
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/pt_BR/LC_MESSAGES
copying build/lib/acct_mgr/locale/pt_BR/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/pt_BR/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/fi
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/fi/LC_MESSAGES
copying build/lib/acct_mgr/locale/fi/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/fi/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/pl
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/pl/LC_MESSAGES
copying build/lib/acct_mgr/locale/pl/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/pl/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/zh_TW
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/zh_TW/LC_MESSAGES
copying build/lib/acct_mgr/locale/zh_TW/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/zh_TW/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/cs
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/cs/LC_MESSAGES
copying build/lib/acct_mgr/locale/cs/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/cs/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/fr
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/fr/LC_MESSAGES
copying build/lib/acct_mgr/locale/fr/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/fr/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/de
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/de/LC_MESSAGES
copying build/lib/acct_mgr/locale/de/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/de/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/id_ID
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/id_ID/LC_MESSAGES
copying build/lib/acct_mgr/locale/id_ID/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/id_ID/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/et
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/et/LC_MESSAGES
copying build/lib/acct_mgr/locale/et/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/et/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/te
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/te/LC_MESSAGES
copying build/lib/acct_mgr/locale/te/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/te/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/uk
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/uk/LC_MESSAGES
copying build/lib/acct_mgr/locale/uk/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/uk/LC_MESSAGES
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/ja
creating build/bdist.linux-x86_64/egg/acct_mgr/locale/ja/LC_MESSAGES
copying build/lib/acct_mgr/locale/ja/LC_MESSAGES/acct_mgr.mo -> build/bdist.linux-x86_64/egg/acct_mgr/locale/ja/LC_MESSAGES
copying build/lib/acct_mgr/locale/.placeholder -> build/bdist.linux-x86_64/egg/acct_mgr/locale
copying build/lib/acct_mgr/admin.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/notification.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/util.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/macros.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/svnserve.py -> build/bdist.linux-x86_64/egg/acct_mgr
creating build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/admin_accountsconfig.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/reset_password_email.txt -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/verify_email.txt -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/verify_email.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/user_changes_email.txt -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/reset_password.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/user_table.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/prefs_account.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/register.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/account_details.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/admin_accountsnotification.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/db_cleanup.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/login.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/templates/admin_users.html -> build/bdist.linux-x86_64/egg/acct_mgr/templates
copying build/lib/acct_mgr/__init__.py -> build/bdist.linux-x86_64/egg/acct_mgr
creating build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/htdocs/acct_mgr.css -> build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/htdocs/locked.png -> build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/htdocs/time-locked.png -> build/bdist.linux-x86_64/egg/acct_mgr/htdocs
copying build/lib/acct_mgr/guard.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/hashlib_compat.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/http.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/htfile.py -> build/bdist.linux-x86_64/egg/acct_mgr
copying build/lib/acct_mgr/api.py -> build/bdist.linux-x86_64/egg/acct_mgr
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/model.py to model.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py to web_ui.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/db.py to db.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/md5crypt.py to md5crypt.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/pwhash.py to pwhash.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/register.py to register.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/admin.py to admin.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/notification.py to notification.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/util.py to util.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/macros.py to macros.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/svnserve.py to svnserve.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/guard.py to guard.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/hashlib_compat.py to hashlib_compat.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/http.py to http.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/htfile.py to htfile.pyc
byte-compiling build/bdist.linux-x86_64/egg/acct_mgr/api.py to api.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracAccountManager.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/TracAccountManager-0.4.3-py2.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing TracAccountManager-0.4.3-py2.6.egg
removing '/usr/lib/python2.6/site-packages/TracAccountManager-0.4.3-py2.6.egg' (and everything under it)
creating /usr/lib/python2.6/site-packages/TracAccountManager-0.4.3-py2.6.egg
Extracting TracAccountManager-0.4.3-py2.6.egg to /usr/lib/python2.6/site-packages
TracAccountManager 0.4.3 is already the active version in easy-install.pth
Installed /usr/lib/python2.6/site-packages/TracAccountManager-0.4.3-py2.6.egg
Processing dependencies for TracAccountManager==0.4.3
Searching for Trac==0.12.4
Best match: Trac 0.12.4
Adding Trac 0.12.4 to easy-install.pth file
Installing trac-admin script to /usr/bin
Installing tracd script to /usr/bin
Using /usr/lib/python2.6/site-packages
Searching for Genshi==0.6
Best match: Genshi 0.6
Processing Genshi-0.6-py2.6.egg
Genshi 0.6 is already the active version in easy-install.pth
Using /usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg
Searching for distribute==0.6.10
Best match: distribute 0.6.10
Adding distribute 0.6.10 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.6 script to /usr/bin
Using /usr/lib/python2.6/site-packages
Finished processing dependencies for TracAccountManager==0.4.3

Configuration de Apache pour Trac

Voici notre fichier de config trac pour Apache :

cat /etc/httpd/conf.d/trac.conf
# Replace all occurrences of /srv/trac with your trac root below
# and uncomment the respective SetEnv and PythonOption directives.
#<LocationMatch /cgi-bin/trac\.f?cgi>
#    #SetEnv TRAC_ENV /srv/trac
#</LocationMatch>
#<IfModule mod_python.c>
#<Location /cgi-bin/trac.cgi>
#    SetHandler mod_python
#    PythonHandler trac.web.modpython_frontend
#    #PythonOption TracEnv /srv/trac
#</Location>
#</IfModule>
ErrorLog  /var/log/httpd/error.infra.trac.log
CustomLog /var/log/httpd/access.infra.trac.log combined
<Location /svn>
DAV svn
SVNPath /var/subversion/infra/
AuthType Basic
AuthName "infra.trac Subversion repository"
AuthUserFile /etc/svn-infra-auth-file
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv "/var/www/html/trac/infra/"
PythonOption TracUriRoot "/"
PythonPath "sys.path + ['/var/www/html/trac/infra/']"
PythonInterpreter main_interpreter
</Location>

Puis on redémarre apache :

service httpd restart

Fichier de configuration du projet (infra) pour Active Directory

Le fichier de config de infra de Trac : /var/www/html/trac/infra/conf/trac.ini

cat trac.ini
# -*- coding: utf-8 -*-
[account-manager]
#password_store = LDAPAuthNStore
#--to use this module with AccountManager, ADAuthStore must be enabled inside of AccountManager
ad_server = 10.0.0.19
password_store = ADAuthStore
ldap_basedn = OU=SBSUsers,OU=Users,OU=MyBusiness,dc=domain,dc=local
ldap_user = read_user_infra
ldap_pass = infra
bind_dn = read_user_infra@abc-objectif.local
bind_passwd = infra
dir_uri = ldap://10.0.0.19
dir_basedn = DC=abc-objectif,DC=local
dir_binddn = read_user_infra@example.com
dir_bindpw = infra
#-- timeout for an ldap operation before in seconds
dir_timeout = 5
dir_charset = utf-8
user_attr = sAMAccountName
name_attr = displayName
email_attr = mail
group_basedn = OU=Security Groups,OU=MyBusiness,dc=domain,dc=local
group_expand = 1
group_attr = cn
group_member_attr = member
group_member_value = dn
#group_tracadmin = CN=Administration,DC=abc-objectif,DC=local
cache_ttl= 90
cache_memsize = 400
cache_memsize_warn = 300
cache_memprune = 5
[attachment]
max_size = 5000000
render_unsafe_content = false
[browser]
downloadable_paths = /trunk, /branches/*, /tags/*
hide_properties = svk:merge
render_unsafe_content = false
[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true
[components]
trac.web.auth.LoginModule = disabled
acct_mgr.admin.AccountManagerAdminPage = enabled
acct_mgr.api.AccountManager = enabled
acct_mgr.web_ui.AccountModule = enabled
acct_mgr.web_ui.LoginModule = enabled
tautua.trac_plugins.* = enabled
ldapplugin.* = enabled
[header_logo]
alt =
height = -1
link = /
src = site/company_logo.png.jpeg
width = -1
[intertrac]
tracurgbox.title = Trac Infra
tracurgbox.url = http://url
tu = tracInfra
[ldap]
basedn = "DC=abc-objectif,DC=local"
bind_passwd = infra
bind_user = "CN=user_read_infra,OU=SBSUsers,OU=Users,OU=MyBusiness,dc=domain,dc=local"
cache_size = 100
cache_ttl = 900
enable = true
global_perms = false
group_bind = false
group_rdn = "OU=Security Groups,OU=MyBusiness,dc=domain,dc=local"
groupattr = cn
groupmember = member
groupmemberisdn = true
groupname = groupofnames
host = 10.0.0.19
manage_groups = true
permattr = tracperm
permfilter = objectclass=*
port = 389
store_bind = false
use_tls = false
#user_bind = true
user_class = sambaSamAccount
user_name_attr = uid
user_rdn = "OU=SBSUsers,OU=Users,OU=MyBusiness,dc=domain,dc=local"
[logging]
log_type = none
[mimeviewer]
enscript_modes = text/x-dylan:dylan:4
enscript_path = enscript
max_preview_size = 262144
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
php_path = php
silvercity_modes =
tab_width = 8
[notification]
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
mime_encoding = qp
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = true
smtp_from = notifier-trac@pmsipilot.com
smtp_password =
smtp_port = 25
smtp_replyto = noreply-trac@pmsipilot.com
smtp_server = mail-server
smtp_subject_prefix = __default__
smtp_user =
use_public_cc = true
use_short_addr = false
use_tls = false
[project]
descr = Infra PMSIpilot
footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
icon = common/trac.ico
name = Infra PMSIpilot
url = http://infra.trac.abc-objectif.local
[search]
min_query_length = 3
[ticket]
default_component = Applications
default_milestone =
default_priority = Mineur
default_type = Tâche
default_version =
restrict_owner = true
[ticket-custom]
billable = checkbox
billable.label = Billable?
billable.order = 3
billable.value = 1
estimatedhours = text
estimatedhours.label = Estimated Number of Hours
estimatedhours.order = 1
estimatedhours.value = 0
hours = text
hours.label = Add Hours to Ticket
hours.order = 2
hours.value = 0
totalhours = text
totalhours.label = Total Hours
totalhours.order = 4
totalhours.value = 0
[ticket-workflow]
accept = new -> assigned
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,reopened -> new
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY
[timeline]
changeset_long_messages = false
changeset_show_files = 0
default_daysback = 30
ticket_show_details = false
[trac]
authz_file =
authz_module_name =
base_url =
check_auth_ip = true
database = sqlite:db/trac.db
default_charset = iso-8859-15
default_handler = WikiModule
htdocs_location =
ignore_auth_case = false
mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
metanav = login,logout,settings,help,about
#permission_store = UserExtensiblePermissionStore
permission_store = DefaultPermissionStore
repository_dir = /var/subversion/infra
repository_type = svn
timeout = 20
[wiki]
ignore_missing_pages = false
split_page_names = false

Création d'un utilisateur pour trac dans l'annuaire

En parallèle nous créons dans l'annuaire de l'AD l'utilisateur "user_read_infra", ceci pour que Trac est un accès en lecture (au moins).

Ajout des traces dans un journal de trac

Nous ajoutons des traces :

http://trac.edgewall.org/wiki/TracLogging

log_type = file
 
log_file = /var/log/trac.log
 
log_level = DEBUG

Pour cela :

touch /var/log/trac.log
 
chmod 777 /var/log/trac.log

Voilà tout devrait fonctionner !

Print Friendly, PDF & Email

Posted in CentOS, Important, Linux, Technique, Toutes. Tagged with , , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.

Time limit is exhausted. Please reload CAPTCHA.


/* */
Creative Commons License
Cette création par Laurent Besson est mise à disposition selon les termes de la licence Creative Commons Paternité-Partage des Conditions Initiales à l'Identique 2.0 France.