linux user group brescia

immagine del castello

Archivio della mailing list

Domanda idiota

EZ EZ recalez a yahoo.it
Mar 19 Nov 2002 14:40:50 UTC
 

> Lo scenario e' "brevemente" questo, una pagina
> dinamica php con
> un form di inserimento password da parte dell'utente
> e fin qui ci siamo...

A me serve un'autentificazione sui dati
dell'/etc/shadow come ingresso ad una base dati
PostgreSQL trattata da PHP.....
Io sono arrivato allo stesso punto......

> Fase numero 2, creazione dell'utente unix e
> sorprese..

Piu che sorprese non so proprio come procedere....
Ho cercato qualche script che si appoggi a PAM, che
faccia tutto il lavoro di confronto....
In rete ho trovato un software, MRBS (meeting room
booking system), che prevede differenti tipi di
autentificazione.... Tra tutti ce n'e' uno che lavora
su PAM, tramite perl-script auth_pam.pl....
Download e documentazione: http://mrbs.sourceforge.net
Provo a darci un'occhiata, non so se faccia al caso
mio e non ho esperienza di programmazione, soprattutto
se parliamo di perl....
Questa e' la doc-sezione che parla dello script....


PAM Authentification
 ----------------------
In case your Unix system uses PAM (especially Linux,
but also SUN Solaris)
 you might try the script auth_pam.pl. This script
takes two two parameters -
 the user name  and the user password.
This perl script requires Authen::PAM.
The script has to be run as SUID. Therefore you should
take some precautions
 to not undermine your system's security. Change the
group of the script to that
 of your Web Server (for Apache this is normally
nobody or apache) and don't
 make it readable and executeable to anybody else,
eg.:
chgrp nobody auth_pam.pl
The script has to be run SUID and has to be executed
by sperl:
chmod 4750 auth_pam.pl
The first line (#!/usr/bin/sperl5.6.0) says where
sperl is located on
 your system. Please adapt this for your needs.
Now add the configuration to web/config.inc in your
MRBS directory.
 This looks as follows (adapt the path to auth_pam.pl
according to your
 your configuration):

 $auth["realm"]  = "MY REALM";
 $auth["type"]   = "ext";
 $auth["prog"]   = "/var/www/html/mrbs/auth_pam.pl";
 $auth["params"] = "#USERNAME# #PASSWORD#";

 That's it.
Note that this has been oly tested with Red Hat 7.x.
Feedback on whether
 this works on other  systems ( eg. Solaris) is
appreciated.


Tutto e' ancora da inventare, quindi......
Se hai qualche altra idea, fammelo sapere, sempre che
il problema sia lo stesso, come mi pare di avere
capito....
Saludos....
ez








Maggiori informazioni sulla lista Lug