Aide script pour CUPS! - Codes et scripts - Linux et OS Alternatifs
Marsh Posté le 15-03-2007 à 18:00:14
pykota et ses amis ? 
http://www.pykota.com/software/
Marsh Posté le 20-03-2007 à 15:17:26
Bonjour, 
 
voila j'ai essayé de configué pykota, mé lorsque je lance la commande pour remplir la base j'ai un petit souci : 
Debian # pkturnkey --force --uidmin 1000 --dousers --uidmax 50000 --dogroups --gidmin 5000 --gidmax 6000
# pkturnkey --force --uidmin 1000 --dousers --uidmax 50000 --dogroups --gidmin 5000 --gidmax 6000 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
INFO: Merci de patienter... 
INFO: Merci de vous INQUIETER MAINTENANT, la base de données SERA MODIFIEE. 
INFO: Extracting all users whose uid is between 1000 and 50000. 
INFO: Extracting all groups whose gid is between 5000 and 6000. 
INFO: Extracting all print queues. 
INFO: pkprinters --arguments /tmp/pkprinters.args 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
ERROR: PyKota v1.26alpha4_unofficial 
ERROR: pkprinters failed 
ERROR: Traceback (most recent call last): 
ERROR:   File "/usr/bin/pkprinters", line 341, in ? 
ERROR:     manager.deferredInit() 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/tool.py", line 444, in deferredInit 
ERROR:     self.storage = storage.openConnection(self) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storage.py", line 862, in openConnection 
ERROR:     return storagebackend.Storage(pykotatool, host, database, admin, adminpw) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storages/pgstorage.py", line 54, in __init__ 
ERROR:     self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
ERROR: InternalError: could not translate host name "ldap://127.0.0.1:389" to address: Nom ou service inconnu 
INFO: pkusers --arguments /tmp/pkusers.users.args 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
ERROR: PyKota v1.26alpha4_unofficial 
ERROR: pkusers failed 
ERROR: Traceback (most recent call last): 
ERROR:   File "/usr/bin/pkusers", line 406, in ? 
ERROR:     manager.deferredInit() 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/tool.py", line 444, in deferredInit 
ERROR:     self.storage = storage.openConnection(self) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storage.py", line 862, in openConnection 
ERROR:     return storagebackend.Storage(pykotatool, host, database, admin, adminpw) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storages/pgstorage.py", line 54, in __init__ 
ERROR:     self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
ERROR: InternalError: could not translate host name "ldap://127.0.0.1:389" to address: Nom ou service inconnu 
INFO: edpykota --arguments /tmp/edpykota.users.args 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
ERROR: PyKota v1.26alpha4_unofficial 
ERROR: edpykota failed 
ERROR: Traceback (most recent call last): 
ERROR:   File "/usr/bin/edpykota", line 320, in ? 
ERROR:     manager.deferredInit() 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/tool.py", line 444, in deferredInit 
ERROR:     self.storage = storage.openConnection(self) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storage.py", line 862, in openConnection 
ERROR:     return storagebackend.Storage(pykotatool, host, database, admin, adminpw) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storages/pgstorage.py", line 54, in __init__ 
ERROR:     self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
ERROR: InternalError: could not translate host name "ldap://127.0.0.1:389" to address: Nom ou service inconnu 
INFO: Base de données initialisée ! 
Debian # emacs /etc/pykota/pykota.conf
# emacs /etc/pykota/pykota.conf 
Debian # /etc/init.d/cupsys restart
# /etc/init.d/cupsys restart 
Restarting Common Unix Printing System: cupsd. 
Debian # pkturnkey --force --uidmin 1000 --dousers --uidmax 50000 --dogroups --gidmin 5000 --gidmax 6000
# pkturnkey --force --uidmin 1000 --dousers --uidmax 50000 --dogroups --gidmin 5000 --gidmax 6000 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
INFO: Merci de patienter... 
INFO: Merci de vous INQUIETER MAINTENANT, la base de données SERA MODIFIEE. 
INFO: Extracting all users whose uid is between 1000 and 50000. 
INFO: Extracting all groups whose gid is between 5000 and 6000. 
INFO: Extracting all print queues. 
INFO: pkprinters --arguments /tmp/pkprinters.args 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
ERROR: PyKota v1.26alpha4_unofficial 
ERROR: pkprinters failed 
ERROR: Traceback (most recent call last): 
ERROR:   File "/usr/bin/pkprinters", line 341, in ? 
ERROR:     manager.deferredInit() 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/tool.py", line 444, in deferredInit 
ERROR:     self.storage = storage.openConnection(self) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storage.py", line 862, in openConnection 
ERROR:     return storagebackend.Storage(pykotatool, host, database, admin, adminpw) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storages/pgstorage.py", line 54, in __init__ 
ERROR:     self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
ERROR: InternalError: could not translate host name "ldap://127.0.0.1:389" to address: Nom ou service inconnu 
INFO: pkusers --arguments /tmp/pkusers.users.args 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
ERROR: PyKota v1.26alpha4_unofficial 
ERROR: pkusers failed 
ERROR: Traceback (most recent call last): 
ERROR:   File "/usr/bin/pkusers", line 406, in ? 
ERROR:     manager.deferredInit() 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/tool.py", line 444, in deferredInit 
ERROR:     self.storage = storage.openConnection(self) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storage.py", line 862, in openConnection 
ERROR:     return storagebackend.Storage(pykotatool, host, database, admin, adminpw) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storages/pgstorage.py", line 54, in __init__ 
ERROR:     self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
ERROR: InternalError: could not translate host name "ldap://127.0.0.1:389" to address: Nom ou service inconnu 
INFO: edpykota --arguments /tmp/edpykota.users.args 
WARN: The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead. 
ERROR: PyKota v1.26alpha4_unofficial 
ERROR: edpykota failed 
ERROR: Traceback (most recent call last): 
ERROR:   File "/usr/bin/edpykota", line 320, in ? 
ERROR:     manager.deferredInit() 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/tool.py", line 444, in deferredInit 
ERROR:     self.storage = storage.openConnection(self) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storage.py", line 862, in openConnection 
ERROR:     return storagebackend.Storage(pykotatool, host, database, admin, adminpw) 
ERROR:   File "/usr/lib/python2.4/site-packages/pykota/storages/pgstorage.py", line 54, in __init__ 
ERROR:     self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
ERROR: InternalError: could not translate host name "ldap://127.0.0.1:389" to address: Nom ou service inconnu 
INFO: Base de données initialisée ! 
 
 
Savez vous d'ou cela vient? 
 
merci 
Marsh Posté le 20-03-2007 à 15:25:45
De là : 
| Citation : 
 | 
Marsh Posté le 21-03-2007 à 11:22:19
slt, 
 
je ne vois pas ce que je doit mettre pour qu'il parle avec le LDAP, je pense qu'en mettant ldap://127.0.0.1:389 sa fonctionnerai. 
 
Personne na un exemple de fichier de configuration de pykota.conf svp 
 
Merci
Marsh Posté le 15-03-2007 à 14:46:32
Bonjour a tous,
alors voila pour mon stage je doit installé un serveur d'impression CUPS avec samba + ldap.
Jusque la pas de souci j'ai tout installé, le probléme c'est que maintenant mon maitre de stage me demande plusieurs chose:
>Limité le nombre d'impression en fonction de lutilisateur
>Créer un script qui fait les statistiques d'impressions ( c'est a dire il doit me retourné telle personne a imprimé tel nombre de page dans la journé), et lorsqu'il s'approche de la limite d'impression il recoi un email.
Pensez vous que cela est possible? Sachant que je n'y connait rien en programmation.
Merci de votre aide