ldap-useradmin/0040775000567100000120000000000010664401636013457 5ustar jcameronwheelldap-useradmin/images/0040775000567100000120000000000010664401636014724 5ustar jcameronwheelldap-useradmin/images/icon.gif0100644000567100000120000000076610664401634016345 0ustar jcameronwheelGIF89a00fff!,00ѽ0J)76SA5] H: o)sJ6Q(bQ Bp xx@gh,w%8aNSi n@G?@?\!x {r t7 n(qLZ`YZ  ( h{z?qE6Sc qKȢVqŠ'nqbͫuS|fsv$},\^_m+C`_E,Din`"D 0,5jcAa~ @z[ ?<m'hNni P7^C!MU  @/Ȱ,˲j2$3ǞUO켋y쥋[$ SKGaifr e-؎\|+Q˝3 ӤDe:Wϭ\vvlй*\A$;ldap-useradmin/images/.xvpics/0040755000567100000120000000000010664401636016314 5ustar jcameronwheelldap-useradmin/images/.xvpics/icon.gif0100664000567100000120000000450110664401634017730 0ustar jcameronwheelP7 332 #IMGINFO:48x48 RGB (502 bytes) #END_OF_COMMENTS 48 48 255 ۶ڻֺ۶ڷں׺mI۶ۺmInmm۶ۺmInmm۶ۺmInmmڶ۶ۺmI۶۶m۶ڷ۶mInڶ۶mInmmڶ۶ۺmImInֺ۶ڻֺ׺ڷmImIֺ۶ڻֺ׺ڷmmJڶֺ۶ڻֺmm۶׻۷mm۶ֺ۶ڻֺ׺ڷmIm۶m۶׺ڷں׺ֻڶmIm۶ڻ׻۷۷ۻֺmIImm۶ڻֺ۶ڷں׺mImۺmI۶mIHۺmIHۺmIHۺm۶mmۺm۶mm۶ۺm۶mm۶ۺmI۶mI߶۶ڻֺ۶ڷں׺۶۶۶ڻֺ۶ڷں׺۶۶۶ڻֺ۶۶۶۷ۻ׻ֺ۶ڻֺ׺ڷ۶ڻڶ۶ڻ׺ֺ۶ڻֺ׺ڷڷ۶ۺֻ۶ۻ׻ڶ۶ۺֻ۶۶ۺֻ۶۶ۺֻ۶۶ۺֻ۶۶ۺֻ۶۶ۺֻ۶۶ۺֻ۶۶ڻֺ۶ڷں׺׺ڷڶۺֻڶ۶۶ڻֺ۶ڷں׺׺ڷڶۺֻڶ۶۶ڻֺ۶ں׺ֻڶ۷ۻ׻۷۶ۻ۶ڻֺ۶ڷں׺׺ڷڶۺֻڶ۶۷ں׺ڷڶۺֻֻڷڶۺֻڷڶ۶ڻ׻۷۷ۻֺ׺ڷ۷ۻ׻۷ڶldap-useradmin/images/smallicon.gif0100664000567100000120000000077610664401634017401 0ustar jcameronwheelGIF87a⍍sssfffdZZ>333|ԀsssrfffdfdZZZ䦦@@@ֳ,NȤi6H sT&,4u D[eCp8KQ(\0% LNP"J $ B%"V B%%I["BrB BwxCpJx%# ~HXuG HY#~pꕕ8W?!!f]R"`!:0x0`;Z4hX: PĢ`H̴r$Ċ)d*$`BKN+l(R $T$;ldap-useradmin/lang/0040775000567100000120000000000010664401636014400 5ustar jcameronwheelldap-useradmin/lang/ca0100644000567100000120000001262310664401635014704 0ustar jcameronwheelindex_title=Usuaris i Grups LDAP index_econfig=No s'ha trobat al sistema el fitxer de configuraci $1 del NSS de LDAP. Haurs de retocar la configuraci del mdul per tal d'utilitzar el cam correcte. index_econfig2=Sembla que el fitxer de configuraci NSS $1 de LDAP s el fitxer de configuraci del servidor LDAP. Haurs d'ajustar la configuraci del mdul per utilitzar el cam del fitxer de configuraci NSS client. index_ehost=Si no s'estableix cap fitxer de configuraci NSS LDAP a la configuraci del mdul, cal establir un servidor LDAP, usuari, contrasenya, DN d'usuari base i DN de grup base. index_eperl=El mdul Perl $1 que necessita aquest mdul no est installat o no funciona adequadament. Fes clic aqu per descarregar-lo i installar-lo ara. index_eperl2=L'error donat per Perl en provar de carregar el mdul s: index_eldap=$1. Pot ser que la configuraci del mdul sigui incorrecta. index_eimap=$1. Pot ser que la configuraci del mdul sigui incorrecta. index_emd5=Aquest mdul s'ha configurat per utilitzar xifratge MD5 amb les contrasenyes, per el mdul Perl $2 no est installat. Fes clic aqu per tal de descarregar i instalLar el mdul $2. index_eslappasswd=Aquest mdul s'ha configurat per utilitzar xifratge LDAP MD5 amb les contrasenyes, per el programa $2 utilitzat per xifrar les contrasenyes no est installat index_eusearch=No he pogut buscar usuaris a $1: $2 index_uadd=Afegeix un nou usuari LDAP. index_gadd=Afegeix un nou grup LDAP. index_unone=No he trobat cap usuari LDAP a $1. index_gnone=No he trobat cap grup LDAP a $1. index_return=a la llista d'usuaris index_egsearch=No he pogut buscar grups a $1: $2 index_samba=Samba index_cyrus=IMAP index_users=Usuaris LDAP index_groups=Grups LDAP conn_econn=No he pogut connectar amb el servidor LDAP $1 port $2 conn_elogin=No he pogut lligar el servidor LDAP $1 com a $2: $3 imap_econn=No he pogut connectar amb el servidor IMAP $1 imap_elogin=No he pogut entrar al servidor IMAP $1 com a $2: $3 uedit_cap=Capacitats de l'usuari uedit_samba=Usuaris Samba uedit_cyrus=Entrada al servidor IMAP uedit_dn=DN LDAP de l'usuari uedit_classes=Classes d'objectes LDAP uedit_fields=Camps addicionals LDAP uedit_alias=lies de correu uedit_firstname=Primer cognom uedit_lastname=Segon cognom uedit_raw=Atributs LDAP uedit_return=als detalls de l'usuari uedit_quota=Quota IMAP uedit_unquota=No ho canvis usave_eadd=No he pogut afegir l'usuari a la base de dades LDAP: $1 usave_emod=No he pogut modificar l'usuari de la base de dades LDAP: $1 usave_emoddn=No he pogut renomenar l'usuari de la base de dades LDAP: $1 usave_egroupmod=No he pogut modificar el grup $1 a la base de dades LDAP: $2 usave_edelete=No he pogut suprimir l'usuari de la base de dades LDAP: $1 usave_eicreate=No he pogut crear l'usuari usave_eiacl=No he pogut donar drets a l'administrador usave_eimap=L'usuari ha estat desat amb xit a la base de dades LDAP, per s'ha produt un error d'IMAP: $1: $2 usave_eiquota=No he pogut establir la quota IMAP usave_eisub=No he pogut subscriure l'usuari a la carpeta $1 usave_eifolder=No he pogut crear la carpeta $1 usave_eilogin=No he pogut entrar amb el nou usuari usave_ecyruspass=Cal introduir la contrasenya normal de l'usuari o b seleccionar l'opci "Sense contrasenya" en activar IMAP. usave_ebook=No he pogut crear l'entrada de la llibreta d'adreces: $1 usave_emodbook=No he pogut modificar l'entrada de la llibreta d'adreces: $1 usave_emodbookdn=No he pogut renomenar l'entrada de la llibreta d'adreces: $1 usave_egone=L'usuari ja no existeix! usave_ex86=Aquest usuari no serveix per a establir la contrasenya d'un usuari Samba en sistemes no Intel, ja que depn d'un programa compilat x86. usave_esamba=Aquest mdul no es pot emprar per establir la contrasenya d'un usuari Samba, ja que el mdul de Compartici de Fitxers Windows Samba no est installat. usave_ealiasdup=L'lies $1 ja est utilitzat per $2 usave_eattrdup=L'objecte $1 ja est utilitzant $2 $3 usave_eattrdupu=L'usuari $1 ja est utilitzant $2 $3 usave_eattrdupg=El grup $1 ja est utilitzant $2 $3 usave_ereal=Hi falta el nom real usave_equota=Hi falta la quota IMAP o b s invlida search_err=La recerca de $1 a $2 no ha reeixit: $3 gedit_dn=DN LDAP del grup gedit_return=als detalls del grup gedit_cap=Capacitats de grup gedit_samba=Grup Samba gsave_egone=El grup ja no existeix! gsave_edelete=No he pogut suprimir el grup de la base de dades LDAP: $1 gsave_eadd=No he pogut afegir el grup a la base de dades LDAP: $1 gsave_emod=No he pogut modificar el grup a la base de dades LDAP: $1 gsave_emoddn=No he pogut renomenar el grup a la base de dades LDAP: $1 gdel_group=Suprimint l'entrada de grup LDAP... udel_pass=Suprimint l'entrada d'usuari LDAP... udel_book=Suprimint de la llibreta d'adreces... udel_imap=Suprimint la carpeta IMAP... udel_warnimap=La bstia de correu existent se suprimir en suprimir el directori arrel! udel_failed=...ha fallat!: $1 raw_title=Atributs LDAP raw_name=Nom de l'atribut raw_value=Valors raw_for=De $1 batch_samba=Crea un compte Samba per als usuaris nous batch_descafter3=A les lnies create i modify, hi pots afegir de forma opcional camps extra que continguin atributs LDAP en la forma name=valor, per assignar-los als usuaris nous o modificats. batch_eattr=Atribut LDAP invlid a la lnia $1: $2 ldap-useradmin/lang/en0100664000567100000120000001160110664401635014720 0ustar jcameronwheelindex_title=LDAP Users and Groups index_econfig=The LDAP NSS configuration file $1 was not found on your system. You will need to adjust the module configuration to use the correct path. index_econfig2=The LDAP NSS configuration file $1 appears to be the LDAP server configuration file. You will need to adjust the module configuration to use the path to the NSS client config file. index_ehost=If no LDAP NSS configuration file is set in the module configuration, an LDAP server, login, password, base user DN and base group DN must be set instead. index_eperl=The $1 Perl module that this module requires is not installed or is not working properly. Click here to have it downloaded and installed now. index_eperl2=The error reported by Perl when trying to load the module was : index_eldap=$1. Maybe your module configuration is incorrect. index_eimap=$1. Maybe your module configuration is incorrect. index_emd5=This module has been configured to use MD5 encryption for passwords, but the $2 Perl module is not installed. Click here to have the $2 module downloaded and installed. index_eslappasswd=This module has been configured to use LDAP MD5 encryption for passwords, but the program $2 used for encrypting a password is not installed. index_eusearch=Failed to search for users under $1 : $2 index_uadd=Add a new LDAP user. index_gadd=Add a new LDAP group. index_unone=No LDAP users were found under $1. index_gnone=No LDAP groups were found under $1. index_return=user list index_egsearch=Failed to search for groups under $1 : $2 index_samba=Samba? index_cyrus=IMAP? index_users=LDAP Users index_groups=LDAP Groups conn_econn=Failed to connect to LDAP server $1 port $2 conn_elogin=Failed to bind to LDAP server $1 as $2 : $3 imap_econn=Failed to connect to IMAP server $1 imap_elogin=Failed to login to IMAP server $1 as $2 : $3 uedit_cap=User capabilities uedit_samba=Samba login? uedit_cyrus=IMAP server login? uedit_dn=User's LDAP DN uedit_classes=LDAP object classes uedit_alias=Mail aliases uedit_fields=Additional LDAP fields uedit_firstname=First name uedit_lastname=Last name uedit_raw=LDAP Attributes uedit_return=user details uedit_quota=IMAP quota uedit_unquota=Don't change usave_eadd=Failed to add user to LDAP database : $1 usave_emod=Failed to modify user in LDAP database : $1 usave_emoddn=Failed to rename user in LDAP database : $1 usave_egroupmod=Failed to modify group $1 in LDAP database : $2 usave_edelete=Failed to delete user from LDAP database : $1 usave_eicreate=Failed to create user usave_eiacl=Failed to grant rights to admin usave_eimap=The user was saved successfully in the LDAP database, but an IMAP error occurred : $1 : $2 usave_eisub=Failed to subscribe user to folder $1 usave_eiquota=Failed to set IMAP quota usave_eifolder=Failed to create folder $1 usave_eilogin=Failed to login as new user usave_ecyruspass=The user's normal password must be entered or the No password required option selected when enabling IMAP. usave_ebook=Failed to create addressbook entry : $1 usave_emodbook=Failed to modify addressbook entry : $1 usave_emodbookdn=Failed to rename addressbook entry : $1 usave_egone=User no longer exists! usave_ex86=This module cannot be used to set the password for a Samba user on non-Intel systems, as it depends upon a compiled x86 program. usave_esamba=This module cannot be used to set the password for a Samba user, as the Samba Windows File Sharing module is not installed. usave_ealiasdup=The alias $1 is already used by $2 usave_eattrdup=The object $1 is already using the $2 $3 usave_eattrdupu=The user $1 is already using the $2 $3 usave_eattrdupg=The group $1 is already using the $2 $3 usave_ereal=Missing real name usave_equota=Missing or invalid IMAP quota search_err=Search for $1 under $2 failed : $3 gedit_dn=Group's LDAP DN gedit_return=group details gedit_cap=Group capabilities gedit_samba=Samba group? gsave_egone=Group no longer exists! gsave_edelete=Failed to delete group from LDAP database : $1 gsave_eadd=Failed to add group to LDAP database : $1 gsave_emod=Failed to modify group in LDAP database : $1 gsave_emoddn=Failed to rename group in LDAP database : $1 gdel_group=Deleting LDAP group entry .. udel_pass=Deleting LDAP user entry .. udel_book=Deleting from addressbook .. udel_imap=Deleting IMAP folder .. udel_warnimap=The existing mail postbox will be deleted when deleting the home directory! udel_failed=.. failed! : $1 raw_title=LDAP Attributes raw_name=Attribute name raw_value=Values raw_for=For $1 batch_samba=Create Samba account for new users? batch_descafter3=In create and modify lines, you can optionally append extra fields containing LDAP atttributes in name=value format, to be assigned to the new or modified users. batch_eattr=Invalid LDAP attribute at line $1 : $2 ldap-useradmin/lang/pt_BR0100644000567100000120000000712510664401635015330 0ustar jcameronwheelindex_title=Usurios e Grupos do LDAP index_econfig=O arquivo de configurao $1 do NSS no foi encontrado no sistema. Voc precisa ajustar a configurao do mdulo para indicar o caminho correto. index_ehost=Se nenhum arquivo de configurao do NSS estiver configurado na configurao do mdulo,ento, um servidor LDAP, usurio, senha e base DN de usurio e grupo devem ser configuradas. index_eperl=O mdulo $1 Perl no est instalado ou no est funcionando. Clique aqui para ter o mesmo baixado e instalado agora. index_eperl2=O erro informado pelo Perl quando tentou carregar o mdulo foi : index_eldap=$1. Talvez sua configurao do mdulo esteja incorreta. index_eimap=$1. Talvez sua configurao do mdulo esteja incorreta. index_emd5=Esse mdulo foi configurado para utilizar encriptao MD5 encryption para as senhas, mas o mdulo Perl $2 Perl no est instalado. Clique aqui para ter o mdulo $2 baixado e instalado. index_eusearch=Falhou ao procurar usurios $1 : $2 index_uadd=Adicionar usurio LDAP. index_gadd=Adicionar grupo LDAP index_unone=Nenhum usurio LDAP encontrado $1. index_gnone=Nenhum grupo LDAP encontrado $1. index_return=lista de usurios index_egsearch=Falha ao procurar por grupos $1 : $2 index_samba=Samba? index_cyrus=IMAP? conn_econn=Falhou ao tentar conectar ao servidor LDAP $1 na porta $2 conn_elogin=Falha ao pesquisar no servidor LDAP $1 como $2 : $3 imap_econn=Falhou ao tentar conectar ao servidor IMAP $1 imap_elogin=Falhou ao tentar autenticar no servidor IMAP $1 como $2 : $3 uedit_cap= do usurio uedit_samba=Autenticar no Samba? uedit_cyrus=Autenticar no servidor IMAP? uedit_dn=DN do usurio LDAP uedit_alias=Endereos de correio uedit_fields=Campos adicionais uedit_firstname=Primeiro Nome uedit_lastname=Sobrenome usave_eadd=Falhou ao adicionar usurio base LDAP : $1 usave_emod=Falhou ao modificar usurio na base LDAP : $1 usave_emoddn=Falhou ao renomear usurio na base LDAP : $1 usave_egroupmod=Falhou ao modificar grupo $1 na base LDAP : $2 usave_edelete=Falhou ao apagar usurio da base LDAP : $1 usave_eicreate=Falhou ao criar usurio usave_eiacl=Falhou ao dar permisses ao usurio administrador usave_eimap=O usurio foi gravado com sucesso na base LDAP, mas ocorreu um erro no IMAP: : $1 : $2 usave_eisub=Falhou ao inscrever usurio ao diretrio $1 usave_eiquota=Falhou ao configurar a quota IMAP usave_eifolder=Falha ao criar diretrio $1 usave_ecyruspass=Deve-se entrar com a senha do usurio ou a opo No password required deve ser selecionada quando entrar no IMAP. usave_ebook=Falha ao criar uma entrada no livro de endereos : $1 usave_emodbook=Falha ao modificar a entrada do livro de endereos : $1 usave_emodbookdn=Falha ao renomear o usurio no livro de endereos : $1 usave_egone=Usurio no existe! usave_ex86=Esse mdulo no pode ser usado para um usurio samba ou usurios de sistemas no Intel, pois ele depende de um programa compilado para x86. usave_esamba=Esse mdulo no pode ser usado para modificar a senha de um usurio do Samba, pois o mdulo do mesmo para compartilhar arquivos no est instalado. search_err=Procura por $1 em $2 falhou : $3 gedit_dn=DN do grupo LDAP gsave_egone=O grupo no existe! gsave_edelete=Falhou ao apagar o grupo do banco de dados LDAP : $1 gsave_eadd=Falhou ao adicionar o grupo ao bando de dados LDAP : $1 gsave_emod=Falhou ao modificar o grupo no banco de dados LDAP : $1 gdel_group=Apagando o grupo LDAP .. udel_pass=Apagando o usurio LDAP .. udel_book=Apagando do livro de endereos .. udel_imap=Apagando a pasta IMAP .. ldap-useradmin/lang/de0100664000567100000120000001115210664401635014707 0ustar jcameronwheelconn_econn=Fehler beim Verbindungsaufbau zum LDAP-Server $1 port $2. conn_elogin=Fehler beim Binden an den LDAP-Server $1 port $2: $3 gdel_group=Lösche LDAP-Gruppeneintrag ... gedit_cap=Gruppenressourcen gedit_dn=Gruppen LDAP DN gedit_return=Gruppen-Details gedit_samba=Samba-Gruppe? gsave_eadd=Hinzufügen der Gruppe zur LDAP-Datenbank fehlgeschlagen: $1 gsave_edelete=Löschen der Gruppe aus der LDAP-Datenbank fehlgeschlagen: $1 gsave_egone=Gruppe existiert nicht mehr. gsave_emod=Ändern der Gruppe in der LDAP-Datenbank fehlgeschlagen: $1 gsave_emoddn=Ändern des Gruppennamens in der LDAP-Datenbank fehlgeschlagen: $1 imap_econn=Fehler beim Verbindungsaufbau zum IMAP-Server $1. imap_elogin=Fehler beim Login auf dem IMAP-Server $1 als $2: $3 index_cyrus=IMAP? index_econfig=Die LDAP NSS Konfigurationsdatei $1 konnte auf dem System nicht gefunden werden. Sie müssen die Modulkonfiguration anpassen. index_econfig2=Die LDAP NSS Konfigurationsdatei $1 scheint die LDAP-Server-Konfigurationsdatei zu sein. Sie müssen die Modulkonfiguration anpassen, um die NSS-Client-Konfigurationsdatei zu verwenden. index_egsearch=Fehler beim Suchen nach Gruppen unter $1: $2 index_ehost=Wenn keine LDAP NSS Konfigurationsdatei in der Modulkonfiguration gesetzt ist, müssen LDAP-Server, Login, Passwort, Base Nutzer DN und Base Gruppen DN definiert sein. index_eimap=$1. Ist Ihre Modulkonfiguration korrekt?. index_eldap=$1. Ist Ihre Modulkonfiguration korrekt?. index_emd5=Dieses Modul ist konfiguriert um MD5-Passwortverschlüsselung zu benutzen, aber das Perl-Modul $2 ist nicht installiert. index_eperl=Das Perl Module $1 das benötigt wird ist nicht installiert oder funktioniert nicht korrekt. index_eperl2=Die Fehlermeldung von Perl beim Laden des Modules war: index_eslappasswd=Dieses Modul ist konfiguriert um MD5-Passwortverschlüsselung zu benutzen, aber das Programm $2 das für die Verschlüsselung benutzt wird ist nicht installiert. index_eusearch=Suche nach Benutzern unter $1 fehlgeschlagen: $2 index_gadd=Eine neue LDAP Gruppe hinzufügen. index_gnone=Es wurde keine LDAP-Gruppe unter $1 gefunden. index_return=Benutzerliste. index_samba=Samba? index_title=LDAP Benutzer und Gruppen index_uadd=Einen neuen LDAP Benutzer hinzufügen. index_unone=Es wurden keine LDAP-Benutzer unter $1 gefunden. raw_for=Für $1 raw_name=Attributname raw_title=LDAP-Attribute raw_value=Werte search_err=Suche nach $1 unter $2 fehlgeschlagen: $3 udel_book=Lösche aus Adressbuch .. udel_imap=Lösche IMAP-Ordner ... udel_pass=Lösche LDAP-Benutzereintrag ... udel_warnimap=Das vorhandene Mailpostfach wird beim Löschen des Stammverzeichnisses mit gelöscht! uedit_alias=Mailaliase uedit_cap=Benutzer darf: uedit_classes=LDAP-Objektklassen uedit_cyrus=IMAP-Server Login? uedit_dn=LDAP DN des Nutzers uedit_fields=Zusätzliche LDAP-Felder: uedit_firstname=Vorname uedit_lastname=Nachname uedit_raw=LDAP-Attribute uedit_return=Benutzer-Details uedit_samba=Samba Login? usave_eadd=Konnte Benutzer nicht zur LDAP-Datenbank hinzufügen: $1 usave_ebook=Erstellen des Adressbucheintrags fehlgeschlagen: $1 usave_ecyruspass=Entweder muss das normale Benutzerpasswort angegeben werden, oder die "Kein Kennwort"-Option muss aktiviert sein, wenn Imap eingeschaltet ist. usave_edelete=Löschen des Benutzers aus der LDAP Datenbank fehlgeschlagen: $1 usave_egone=Benutzer existiert nicht mehr! usave_egroupmod=Ändern der Gruppe $1 fehlgeschlagen: $2 usave_eiacl=Konnte Admin nicht die erforderlichen Rechte geben. usave_eicreate=Erstellen des Benutzers fehlgeschlagen usave_eifolder=Konnte Ordner $1 nicht erstellen. usave_eimap=Benutzer konnte erfolgreich zur LDAP-Datenbank hinzugefügt werden, aber ein IMAP-Fehler ist aufgetreten: $1: $2 usave_eiquota=Setzen der IMAP-Quota fehlgeschlagen. usave_eisub=Konnte den Benutzer nicht zum Ordner $1 hinzufügen. usave_emod=Ändern der Benutzerdaten in der LDAP-Datenbank fehlgeschlagen: $1 usave_emodbook=Ändern des Adressbucheintrags fehlgeschlagen: $1 usave_emodbookdn=Umbenennen des Adressbucheintrags fehlgeschlagen: $1 usave_emoddn=Umbennen des Benutzers fehlgeschlagen: $1 usave_esamba=Dieses Modul kann nicht benutzt werden, um das Passwort für einen Samba-Benutzer zu setzen, da das Samba-Modul nicht installiert ist. usave_ex86=Dieses Module kann nicht genutzt werden, um das Sambapasswort des Benutzers auf Nicht-Intel-Systemen zu ändern, da es von einem fuer x86-Systeme kompilierten Programm abhängt. ldap-useradmin/lang/es0100644000567100000120000001163710664401635014734 0ustar jcameronwheelbatch_samba=¿Crear cuenta Samba para los nuevos usuarios? conn_econn=Fallo al conectar al servidor LDAP $1 puerto $2 conn_elogin=Fallo al enlazar al servidor LDAP $1 como $2 : $3 gdel_group=Borrando entrada de grupo LDAP .. gedit_cap=Capacidades de grupo gedit_dn=LDAP DN de Grupo gedit_return=detalles de grupo gedit_samba=¿Grupo Samba? gsave_eadd=Fallo al añadir grupo a la BBDD de LDAP : $1 gsave_edelete=Fallo al borrar grupo de la BBDD de LDAP : $1 gsave_egone=¡El grupo ya no existe! gsave_emod=Fallo al modificar grupo en la BBDD de LDAP : $1 gsave_emoddn=Fallo al renombrar grupo en la BBDD de LDAP : $1 imap_econn=Fallo al conectar a servidor IMAP $1 imap_elogin=Fallo en login a servidor IMAP $1 como $2 : $3 index_cyrus=¿IMAP? index_econfig=El archivo de configuración NSS de LDAP $1 no se encuentra en su sistema. Puede que necesite ajustar la configuración de módulo y poner la ruta correcta. index_econfig2=El archivo de configuración NSS de LDAP $1 parece ser el archivo de configuración del servidor LDAP. Puede que necesite ajustar la configuración de módulo y poner la ruta correcta al archivo de configuración del cliente NSS. index_egsearch=Fallo en la búsqueda de grupos bajo $1 : $2 index_ehost=Si no se introduce ningún archivo de configuración NSS de LDAP en la configuración de módulo, se ha de introducir un servidor LDAP, un usuario, una contraseña, un usuario base DN y un grupo base DN. index_eimap=$1. Puede que su configuración de módulo sea incorrecta. index_eldap=$1. Puede que su configuración de módulo sea incorrecta. index_emd5=Esta módulo se ha configurado para usar encriptación MD5 para las contraseñas, pero el módulo de Perl $2 no está instalado. Pulse aquí para descargar e instalar el módulo $2. index_eperl=El módulo de Perl $1 que es necesario para este módulo no está instalado o bien no funciona bien. Pulse aquí para descargarlo e instalarlo. index_eperl2=El error que muestra Perl al intentar cargar el módulo es : index_eslappasswd=Este módulo se ha configurado para utilizar encriptación LDAP MD5 para las contraseñas, pero el programa $2 utilizado para encriptar una contraseña no está intalado index_eusearch=Fallo en la búsqueda de usuarios bajo $1 : $2 index_gadd=Añadir un grupo LDAP nuevo. index_gnone=No se encontraron grupos LDAP bajo $1. index_return=lista usuarios index_samba=¿Samba? index_title=Usuarios y Grupos LDAP index_uadd=Añadir un nuevo usuario LDAP. index_unone=No se encontraron usuarios LDAP bajo $1. raw_for=Para $1 raw_name=Nombre de atributo raw_title=Atributos LDAP raw_value=Valores search_err=La búsqueda de $1 en $2 falló : $3 udel_book=Borrando de la libreta de direcciones .. udel_imap=Borrando carpeta IMAP .. udel_pass=Borrando entrada de usuario LDAP .. udel_warnimap=¡El buzón de correo existente será borrado cuando se borre el directorio home! uedit_alias=Alias de Correo uedit_cap=Capacidades de Usuario uedit_classes=Clases de objeto LDAP uedit_cyrus=¿Login servidor IMAP? uedit_dn=DN LDAP de usuario uedit_fields=Campos LDAP adicionales uedit_firstname=Nombre uedit_lastname=Apellidos uedit_raw=Atributos LDAP uedit_return=detalles de usuario uedit_samba=¿Login Samba? usave_eadd=Fallo al añadir usuario a BBDD de LDAP : $1 usave_ebook=Fallo al crear entrada en libreta de direcciones : $1 usave_ecyruspass=Ha de introducirse la contraseña normal del usuario, o bien seleccionar la opción No se necesita contraseña cuando se habilita IMAP. usave_edelete=Fallo al borrar usuario de BBDD de LDAP : $1 usave_egone=¡El usuario ya no existe! usave_egroupmod=Fallo al modificar grupo $1 en BBDD de LDAP : $2 usave_eiacl=Fallo al dar permisos de administración usave_eicreate=Fallo al crear usuario usave_eifolder=Fallo al crear carpeta $1 usave_eimap=El usuario se salvó correctamente en la BBDD de LDAP, pero ocurrió un error IMAP : $1 : $2 usave_eiquota=Fallo al configurar cuota IMAP usave_eisub=Fallo al subscribir usuario a carpeta $1 usave_emod=Fallo al modificar usuario en BBDD de LDAP : $1 usave_emodbook=Fallo al modificar entrada en libreta de direcciones : $1 usave_emodbookdn=Fallo al renombrar entrada en libreta de direcciones : $1 usave_emoddn=Fallo al renombrar usuario en BBDD de LDAP : $1 usave_esamba=Este módulo no se puede utilizar para configurar un usuario Samba, ya que el módulo de Compartición de Archivos Windows Samba no está instalado usave_ex86=Este módulo no se puede utilizar para configurar la contraseña de un usuario Samba de un sistema no Intel, dado que depende de un programa compilado para x86. ldap-useradmin/batch_form.cgi0100775000567100000120000000523210664401635016250 0ustar jcameronwheel#!/usr/local/bin/perl # batch_form.cgi # Display a form for doing batch creation, updates or deletion from a text file require './ldap-useradmin-lib.pl'; $access{'batch'} || &error($text{'batch_ecannot'}); &ui_print_header(undef, $text{'batch_title'}, ""); $ldap = &ldap_connect(); $schema = $ldap->schema(); $pft = $schema->attribute("shadowLastChange") ? 2 : 0; print "$text{'batch_desc'}\n"; print "

",$text{'batch_desc'.$pft},"

\n"; print "$text{'batch_descafter'}
\n"; print "$text{'batch_descafter2'}
\n"; print "$text{'batch_descafter3'}
\n"; print "

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'batch_source'} \n"; print " ", "$text{'batch_source0'}
\n"; print " ", "$text{'batch_source1'} ", &file_chooser_button("local"),"
\n"; print " ", "$text{'batch_source2'}
", "
$text{'batch_others'}",&ui_yesno_radio("others", $mconfig{'default_other'} ? 1 : 0), "
$text{'batch_batch'}",&ui_yesno_radio("batch", 1),"
$text{'batch_makehome'}",&ui_yesno_radio("makehome", 1),"
$text{'batch_copy'}",&ui_yesno_radio("copy", 1),"
$text{'batch_movehome'}",&ui_yesno_radio("movehome", 1),"
$text{'batch_chuid'}",&ui_radio("chuid", 1, [ [ 0, $text{'no'} ], [ 1, $text{'home'} ], [ 2, $text{'uedit_allfiles'} ] ]),"
$text{'batch_chgid'}",&ui_radio("chgid", 1, [ [ 0, $text{'no'} ], [ 1, $text{'home'} ], [ 2, $text{'uedit_allfiles'} ] ]),"
$text{'batch_delhome'}",&ui_yesno_radio("delhome", 1),"
$text{'batch_crypt'}",&ui_yesno_radio("crypt", 0),"
$text{'batch_samba'}",&ui_yesno_radio("samba", $config{'samba_def'} ? 1 : 0),"
\n"; &ui_print_footer("", $text{'index_return'}); ldap-useradmin/module.info0100664000567100000120000000046310664401636015621 0ustar jcameronwheeldesc=LDAP Users and Groups category=system depends=useradmin longdesc=Manage users and groups stored in an LDAP database, used for Unix, Samba and Cyrus IMAP authentication. desc_ca=Usuaris i Grups LDAP desc_de=LDAP Nutzer und Gruppen os_support=!windows desc_es=Usuarios y Grupos LDAP cpan=1 version=1.363 ldap-useradmin/log_parser.pl0100775000567100000120000000306210664401635016151 0ustar jcameronwheel# log_parser.pl # Functions for parsing this module's logs do 'ldap-useradmin-lib.pl'; # parse_webmin_log(user, script, action, type, object, ¶ms) # Converts logged information from this module into human-readable form sub parse_webmin_log { local ($user, $script, $action, $type, $object, $p, $long) = @_; $object = &html_escape($object); if ($type eq 'user') { if ($action eq 'modify' && $p->{'old'} ne $object) { return &text('log_urename', "".&html_escape($p->{'old'})."", "$object"); } elsif ($action eq 'modify') { return &text('log_umodify', "$object"); } elsif ($action eq 'create') { return &text('log_ucreate', "$object"); } elsif ($action eq 'delete' && $p->{'delhome'}) { return &text('log_udeletehome', "$object", "".&html_escape($p->{'home'}).""); } elsif ($action eq 'delete') { return &text('log_udelete', "$object"); } } elsif ($type eq 'group') { if ($action eq 'modify') { return &text('log_gmodify', "$object"); } elsif ($action eq 'create') { return &text('log_gcreate', "$object"); } elsif ($action eq 'delete') { return &text('log_gdelete', "$object"); } } elsif ($action eq 'batch') { if ($object =~ /^\//) { return &text($long ? 'log_batch_l' : 'log_batch', "$object", $p->{'created'}, $p->{'modified'}, $p->{'deleted'}); } else { return &text($long ? 'log_ubatch_l' : 'log_ubatch', $p->{'created'}, $p->{'modified'},$p->{'deleted'}); } } return undef; } ldap-useradmin/edit_user.cgi0100775000567100000120000003722010664401635016131 0ustar jcameronwheel#!/usr/local/bin/perl # edit_user.cgi # Display details of an existing user and allow editing require './ldap-useradmin-lib.pl'; use Time::Local; &ReadParse(); $ldap = &ldap_connect(); $schema = $ldap->schema(); if ($in{'new'}) { $access{'ucreate'} || &error($text{'uedit_ecreate'}); $pass = $mconfig{'lock_string'}; $shell = $mconfig{'default_shell'} if ($mconfig{'default_shell'}); foreach $oec (split(/\s+/, $config{'other_class'})) { $oclass{$oec}++; } if ($config{'samba_def'}) { $oclass{$samba_class}++; } if ($config{'imap_def'}) { @cyrus_class_3 = split(' ',$cyrus_class); $oclass{$cyrus_class_3[0]}++; } # Get initial values from form parameters foreach $n ("user", "firstname", "lastname", "real", "home", "shell", "gid", "pass", "change", "expire", "min", "max", "warn", "inactive") { if (defined($in{$n})) { $$n = $in{$n}; } } &ui_print_header(undef, $text{'uedit_title2'}, ""); } else { # Get values from current user $rv = $ldap->search(base => $in{'dn'}, scope => 'base', filter => '(objectClass=posixAccount)'); ($uinfo) = $rv->all_entries; @users = $uinfo->get_value('uid'); $user = $users[0]; $uid = $uinfo->get_value('uidNumber'); $firstname = $uinfo->get_value('givenName'); $lastname = $uinfo->get_value('sn'); $real = $uinfo->get_value('cn'); $home = $uinfo->get_value('homeDirectory'); $shell = $uinfo->get_value('loginShell'); $gid = $uinfo->get_value('gidNumber'); $pass = $uinfo->get_value('userPassword'); $change = $uinfo->get_value('shadowLastChange'); $expire = $uinfo->get_value('shadowExpire'); $min = $uinfo->get_value('shadowMin'); $max = $uinfo->get_value('shadowMax'); $warn = $uinfo->get_value('shadowWarning'); $inactive = $uinfo->get_value('shadowInactive'); foreach $oc ($uinfo->get_value('objectClass')) { $oclass{$oc} = 1; } @alias = $uinfo->get_value('alias'); %uinfo = &dn_to_hash($uinfo); &can_edit_user(\%uinfo) || &error($text{'uedit_eedit'}); &ui_print_header(undef, $text{'uedit_title'}, ""); } # build a list of used shells and uids @shlist = ($mconfig{'default_shell'} ? ( $mconfig{'default_shell'} ) : ( )); %shells = map { $_, 1 } split(/,/, $config{'shells'}); push(@shlist, "/bin/sh", "/bin/csh", "/bin/false") if ($shells{'fixed'}); if ($shells{'passwd'}) { # Don't do this unless we need to, as scanning all users is slow &build_user_used(undef, \@shlist); } if ($shells{'shells'}) { open(SHELLS, "/etc/shells"); while() { s/\r|\n//g; s/#.*$//; push(@shlist, $_) if (/\S/); } close(SHELLS); } push(@shlist, $shell) if ($shell); @shlist = &unique(@shlist); print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'uedit_details'}
\n"; if (!$in{'new'}) { print "\n"; print "\n"; print "\n"; print "\n"; } # Show username input print "\n"; if (@users > 1) { print "\n"; } else { print "\n"; } # Show UID input, filled in with a default for new users print "\n"; if ($in{'new'}) { # Find the first free UID above the base $newuid = $mconfig{'base_uid'}; while(&check_uid_used($ldap, $newuid)) { $newuid++; } print "\n"; } else { print "\n"; } if ($config{'given'}) { # Show Full name inputs if ($in{'new'}) { $onch = "onChange='form.real.value = form.firstname.value+\" \"+form.lastname.value'"; } print "\n"; print "\n"; print "\n"; print "\n"; } # Show real name input print "\n"; print "\n"; # Show home directory input, with an 'automatic' option print "\n"; print "\n"; # Show shell selection menu print "\n"; print "\n"; # Show password fields if ($in{'new'} && $mconfig{'random_password'}) { &seed_random(); foreach (1 .. 15) { $random_password .= $random_password_chars[ rand(scalar(@random_password_chars))]; } } if (%uinfo && $pass ne $config{'lock_string'} && $pass ne "") { # Can disable if not already locked, or if a new account $can_disable = 1; if ($pass =~ /^\Q$useradmin::disable_string\E/) { $disabled = 1; $pass =~ s/^\Q$useradmin::disable_string\E//; } } elsif (!%uinfo) { $can_disable = 1; } print "\n"; # Show alternate shell field print "\n"; print "\n"; print "\n"; print "
$text{'uedit_dn'}$in{'dn'}
$text{'uedit_classes'}",join(" , ", map { "$_" } $uinfo->get_value('objectClass')),"
$text{'user'}$text{'uid'}
$text{'uedit_firstname'}$text{'uedit_lastname'}
$text{'real'}$text{'home'}\n"; if ($mconfig{'home_base'}) { local $hb = $in{'new'} || &auto_home_dir($mconfig{'home_base'}, $user) eq $home; printf " %s\n", $hb ? "checked" : "", $text{'uedit_auto'}; printf "\n", $hb ? "" : "checked"; printf " %s\n", $hb ? "" : $home, &file_chooser_button("home", 1); } else { print "\n", &file_chooser_button("home", 1); } print "
$text{'shell'}$text{'pass'}", " \n"; printf" %s
\n", $pass eq "" && $random_password eq "" ? "checked" : "", $mconfig{'empty_mode'} ? $text{'none1'} : $text{'none2'}; printf" $text{'nologin'}
\n", $pass eq $mconfig{'lock_string'} && $random_password eq "" ? "checked" : ""; printf " $text{'clear'}\n", $random_password ne "" ? "checked" : ""; printf "
\n", $mconfig{'passwd_stars'} ? "type=password" : "", $mconfig{'random_password'} && $n eq "" ? $random_password : ""; printf " $text{'encrypted'}\n", $pass && $pass ne $mconfig{'lock_string'} ? "checked" : ""; printf "\n", $pass && $pass ne $mconfig{'lock_string'} ? $pass : ""; # Show password lock checkbox if ($can_disable) { printf "
   ". " %s\n", $disabled ? "checked" : "", $text{'uedit_disabled'}; } print "
$text{'uedit_other'}\n"; print &file_chooser_button("othersh", 0),"

\n"; if (&in_schema($schema, "shadowLastChange")) { # Show shadow password options print "\n"; print "\n"; print "
$text{'uedit_passopts'}
\n"; print "\n"; print "\n"; print "\n"; if ($in{'new'}) { if ($mconfig{'default_expire'} =~ /^(\d+)\/(\d+)\/(\d+)$/) { $eday = $1; $emon = $2; $eyear = $3; } } elsif ($expire) { @tm = localtime(timelocal(gmtime($expire * 60*60*24))); $eday = $tm[3]; $emon = $tm[4]+1; $eyear = $tm[5]+1900; } print "\n"; print "\n"; printf "\n", $in{'new'} ? $mconfig{'default_min'} : $min; print "\n"; printf "\n", $in{'new'} ? $mconfig{'default_max'} : $max; print "\n"; printf "\n", $in{'new'} ? $mconfig{'default_warn'} : $warn; print "\n"; printf "\n", $in{'new'} ? $mconfig{'default_inactive'} : $inactive; print "
$text{'change'}"; if ($change) { @tm = localtime(timelocal(gmtime($change * 60*60*24))); printf "%s/%s/%s\n", $tm[3], $text{"smonth_".($tm[4]+1)}, $tm[5]+1900; } elsif ($in{'new'}) { print "$text{'uedit_never'}\n"; } else { print "$text{'uedit_unknown'}\n"; } print "$text{'expire'}"; &useradmin::date_input($eday, $emon, $eyear, 'expire'); print "
$text{'min'}$text{'max'}
$text{'warn'}$text{'inactive'}

\n"; } # Show primary group print "\n"; print "\n"; print "
$text{'uedit_gmem'}
\n"; print "\n", $in{'new'} ? $mconfig{'default_group'} : ($x=&all_getgrgid($gid)) || $gid, &group_chooser_button("gid"); if ($config{'secmode'} != 1) { # Work out which secondary groups the user is in @defsecs = &split_quoted_string($mconfig{'default_secs'}); $base = &get_group_base(); $rv = $ldap->search(base => $base, filter => '(objectClass=posixGroup)'); %ingroups = ( ); foreach $g (sort { lc($a->dn()) cmp lc($b->dn()) } $rv->all_entries) { $group = $g->get_value("cn"); @mems = $g->get_value("memberUid"); local $ismem = &indexof($user, @mems) >= 0; if ($n eq "") { $ismem = 1 if (&indexof($group, @defsecs) >= 0); } $ingroups{$group} = $ismem; } print "\n"; } if ($config{'secmode'} == 0) { # Show secondary groups with select menu print "\n"; } elsif ($config{'secmode'} == 2) { # Show a text box @insecs = ( ); foreach $g (sort { lc($a->dn()) cmp lc($b->dn()) } $rv->all_entries) { $group = $g->get_value("cn"); if ($ingroups{$group}) { push(@insecs, $group); } } print "\n"; } else { # Don't show print "\n"; } print "\n"; print "
$text{'group'} \n"; printf " %s$text{'uedit_2nd'}",&ui_textarea("sgid", join("\n", @insecs), 5, 20),"

\n"; # Show extra fields (if any) &extra_fields_input($config{'fields'}, $uinfo); # Show capabilties section print "\n"; print "\n"; print "
$text{'uedit_cap'}
\n"; print "\n"; printf "\n", $oclass{$samba_class} ? "" : "checked", $text{'no'}; if ($config{'imap_host'}) { print "\n"; @cyrus_class_3 = split(' ',$cyrus_class); printf "\n", $oclass{$cyrus_class_3[0]} ? "" : "checked", $text{'no'}; if ($config{'domain'}) { print "\n"; print "\n", join(" ", @alias); } # Show field for changing the quota on existing users, or setting # it for new users if ($config{'quota_support'}) { print "\n"; } } else { printf "\n", $oclass{$cyrus_class}; print "\n"; } print "
$text{'uedit_samba'} %s\n", $oclass{$samba_class} ? "checked" : "", $text{'yes'}; printf " %s$text{'uedit_cyrus'} %s\n", $oclass{$cyrus_class_3[0]} ? "checked" : "", $text{'yes'}; printf " %s
$text{'uedit_alias'}\n"; printf "
$text{'uedit_quota'} \n"; if ($in{'new'} || !$oclass{$cyrus_class_3[0]}) { print &ui_textbox("quota", $config{'quota'}, 10)." kB"; } else { print &ui_opt_textbox("quota", undef, 10, $text{'uedit_unquota'})." Kb"; } print "

\n"; if ($in{'new'}) { print "\n"; print "\n"; print "
$text{'uedit_oncreate'}
\n"; print "\n"; print "\n"; print "\n"; printf "\n", $mconfig{'default_other'} ? "" : "checked"; print "
$text{'uedit_makehome'} $text{'yes'}\n"; print " $text{'no'}
$text{'uedit_cothers'} $text{'yes'}\n", $mconfig{'default_other'} ? "checked" : ""; printf " $text{'no'}
\n"; } else { print "\n"; print "\n"; print "
$text{'onsave'}
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; printf "\n", $mconfig{'default_other'} ? "" : "checked"; print "
$text{'uedit_movehome'} $text{'yes'}\n"; print " $text{'no'}
$text{'uedit_chuid'} $text{'no'}\n"; print " ", "$text{'home'}\n"; print " ", "$text{'uedit_allfiles'}
$text{'chgid'} $text{'no'}\n"; print " ". "$text{'home'}\n"; print " ", "$text{'uedit_allfiles'}
$text{'uedit_mothers'} $text{'yes'}\n", $mconfig{'default_other'} ? "checked" : ""; printf " $text{'no'}
\n"; } print "\n"; if ($in{'new'}) { # Show buttons for new users print "\n"; } else { # Show buttons for existing users print "\n"; print "\n"; if (&foreign_available("mailboxes") && &foreign_installed("mailboxes", 1)) { # Link to the mailboxes module, if installed print "\n"; } if (&foreign_available("usermin") && &foreign_installed("usermin", 1) && (%uacl = &get_module_acl("usermin") && $uacl{'sessions'})) { # Link to Usermin module for switching to some user print "\n"; } print "\n"; } print "
\n"; print "

\n"; &ui_print_footer("", $text{'index_return'}); ldap-useradmin/index.cgi0100775000567100000120000001732710664401635015263 0ustar jcameronwheel#!/usr/local/bin/perl # index.cgi # List all LDAP users for editing require './ldap-useradmin-lib.pl'; &ui_print_header(undef, $module_info{'desc'}, "", "intro", 1, 1); # Make sure the LDAP NSS client config file exists, or the needed information # has been provided if ($config{'auth_ldap'}) { if (!-r $config{'auth_ldap'}) { print &text('index_econfig', "$config{'auth_ldap'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } $nss = &get_nss_config(); if ($nss->{'pidfile'} || $nss->{'directory'}) { print &text('index_econfig2', "$config{'auth_ldap'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } } else { if (!$config{'ldap_host'} || !$config{'login'} || !$config{'pass'} || !$config{'user_base'} || !$config{'group_base'}) { print &text('index_ehost', "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } } # Make sure the LDAP Perl module is installed, and if not offer to install if (!$got_net_ldap) { local @needs; foreach $m ("Convert::ASN1", "Net::LDAP") { eval "use $m"; push(@needs, $m) if ($@); } $missing = &urlize(join(" ", @needs)); print &text('index_eperl', "$missing", "/cpan/download.cgi?source=3&cpan=$missing&mode=2&". "return=/$module_name/&returndesc=". &urlize($text{'index_return'})),"

\n"; print "$text{'index_eperl2'}\n"; print "

$net_ldap_error
\n"; &ui_print_footer("/", $text{'index'}); exit; } # Try to login .. may fail $ldap = &ldap_connect(1); if (!ref($ldap)) { print &text('index_eldap', $ldap, "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } if ($config{'imap_host'}) { # Make sure the IMAP Perl module is installed, and if not offer # to install if (!$got_net_imap) { print &text('index_eperl', "Net::IMAP", "/cpan/download.cgi?source=3&cpan=Net::IMAP&mode=2&". "return=/$module_name/&returndesc=". &urlize($text{'index_return'})),"

\n"; print "$text{'index_eperl2'}\n"; print "

$net_imap_error
\n"; &ui_print_footer("/", $text{'index'}); exit; } # Try to connect to the IMAP server $imap = &imap_connect(1); if (!ref($imap)) { print &text('index_eimap', $imap, "$gconfig{'webprefix'}/config.cgi?$module_name"),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } } # If using MD5, make sure needed perl modules or programs are installed if ($config{'md5'} == 1) { # Check if MD5 perl module is installed, and offer to install &foreign_require("useradmin", "user-lib.pl"); if ($err = &useradmin::check_md5()) { print &text('index_emd5', "../config.cgi?$module_name", "$err", "../cpan/download.cgi?source=3&cpan=Digest::MD5&mode=2&return=/$module_name/&returndesc=".&urlize($text{'index_return'})),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } } elsif ($config{'md5'} == 3) { # Check if slappasswd is installed if (!&has_command($config{'slappasswd'})) { print &text('index_eslappasswd', "../config.cgi?$module_name", "$config{'slappasswd'}"),"

\n"; &ui_print_footer("/", $text{'index'}); exit; } } # Count the number of users and groups $base = &get_user_base(); $rv = $ldap->search(base => $base, filter => '(objectClass=posixAccount)', sizelimit => $mconfig{'display_max'}+1); $ucount = $rv->count; $base = &get_group_base(); $rv = $ldap->search(base => $base, filter => '(objectClass=posixGroup)', sizelimit => $mconfig{'display_max'}+1); $gcount = $rv->count; # Get the list of users and groups if ($ucount <= $mconfig{'display_max'}) { @allulist = &list_users(); @ulist = &useradmin::list_allowed_users(\%access, \@allulist); } if ($gcount <= $mconfig{'display_max'}) { @allglist = &list_groups(); @glist = &useradmin::list_allowed_groups(\%access, \@allglist); } # Build links for adding users @links = ( ); if ($access{'ucreate'}) { push(@links, "$text{'index_uadd'}"); } if ($access{'batch'}) { push(@links, "$text{'index_batch'}"); } # Show users list header if ($ucount || $access{'ucreate'}) { print "\n"; print "\n"; print "\n"; if ($gcount || $access{'gcreate'}) { print "\n"; } print "
".&ui_subheading($text{'index_users'})."", "$text{'index_gjump'}
\n"; } $form = 0; if ($ucount > $mconfig{'display_max'}) { # Show user search form print "$text{'index_toomany'}

\n"; print "

\n"; print "$text{'index_find'}   \n"; print "
\n"; print &ui_links_row(\@links); } elsif (@ulist) { # Show table of all users @ulist = &useradmin::sort_users(\@ulist, $mconfig{'sort_mode'}); &useradmin::users_table(\@ulist, $form++, 1, 0, \@links); } else { # No users $base = &get_user_base(); print "",&text('index_unone', "$base"),"

\n"; print &ui_links_row(\@links); } # Show groups header if ($gcount || $access{'gcreate'}) { print "


\n"; print "\n"; print "\n"; print "\n"; if ($ucount || $access{'ucreate'}) { print "\n"; } print "
".&ui_subheading($text{'index_groups'})."", "$text{'index_ujump'}
\n"; } # Get the list of groups @links = ( ); if ($access{'gcreate'}) { push(@links, "$text{'index_gadd'}"); } if ($gcount > $mconfig{'display_max'}) { # Show group search form print "$text{'index_gtoomany'}
\n"; print "
\n"; print "$text{'index_gfind'}   \n"; print "
\n"; print "
\n"; print &ui_links_row(\@links); } elsif (@glist) { # Show table of all groups @glist = &useradmin::sort_groups(\@glist, $mconfig{'sort_mode'}); &useradmin::groups_table(\@glist, $form++, 0, \@links); } elsif ($access{'gcreate'} || !@allglist) { # Show none message $base = &get_group_base(); print "",&text('index_gnone', "$base"),"

\n"; print &ui_links_row(\@links); } &ui_print_footer("/", $text{'index'}); ldap-useradmin/config.info0100664000567100000120000001174010664401635015600 0ustar jcameronwheelline1=LDAP server options,11 auth_ldap=Linux LDAP NSS library config file,3,None ldap_host=LDAP server host,3,From NSS config file ldap_port=LDAP server port,3,From NSS config file or default ldap_tls=LDAP server uses TLS?,1,1-Yes,0-No login=Bind to LDAP server as,3,Bind name from NSS config file pass=Credentials for bind name above,12 user_base=Base for users,3,From NSS config file group_base=Base for groups,3,From NSS config file other_class=Other objectClasses to add to new users,0 gother_class=Other objectClasses to add to new groups,0 given=Show fields for given name and surname?,1,1-Yes,0-No given_class=Object class to add for given name?,0 slappasswd=Full path to slappasswd program,0 line9=LDAP attributes,11 props=LDAP properties for all new users
(In fieldname: value format),9,40,3,\t mod_props=LDAP properties for modified users
(In fieldname: value format),9,40,3,\t fields=Extra LDAP user properties to allow editing of
(In fieldname description format),9,40,3,\t group_props=LDAP properties for all new groups
(In fieldname: value format),9,40,3,\t group_mod_props=LDAP properties for modified groups
(In fieldname: value format),9,40,3,\t group_fields=Extra LDAP group properties to allow editing of
(In fieldname description format),9,40,3,\t multi_fields=Allow multiple values for extra properties?,1,1-Yes,0-No noclash=Attributes for which duplicates are disallowed,0 line5=Home directory options,11 homedir_perms=Permissions on new home directories,3,From Users and Groups module user_files=Copy files into new home directories from,3,From Users and Groups module home_base=Automatic home directory base,3,From Users and Groups module home_style=Automatic home directory style,4,0-home/username,1-home/u/username,2-home/u/us/username,3-home/u/s/username,4-Just base directory,5-home/primary_group/username,-From Users and Groups module line6=New user options,11 base_uid=Lowest UID for new users,3,From Users and Groups module base_gid=Lowest GID for new groups,3,From Users and Groups module md5=Encryption method for passwords,1,3-LDAP MD5,1-Unix MD5,0-crypt,2-Plain text shells=Build list of shells from,2,fixed-Builtin list,passwd-System users,shells-/etc/shells line7=New user defaults,11 default_group=Default primary group for new users,3,From Users and Groups module default_secs=Default secondary groups for new users,3,From Users and Groups module default_shell=Default shell for new users,3,From Users and Groups module default_min=Default minimum days for new users,3,From Users and Groups module default_max=Default maximum days for new users,3,From Users and Groups module default_warn=Default warning days for new users,3,From Users and Groups module default_inactive=Default inactive days for new users,3,From Users and Groups module default_expire=Default expiry date for new users (dd/mm/yyyy),3,From Users and Groups module default_other=Create and update in other modules,1,1-Yes,0-No,-From Users and Groups module line8=Display options,11 display_max=Maximum number of users or groups to display,3,From Users and Groups module passwd_stars=Conceal plain-text password?,1,1-Yes,0-No,-From Users and Groups module random_password=Generate password for new users?,1,1-Yes,0-No,-From Users and Groups module charset=Character set for editing users and groups,3,From Webmin language secmode=Show secondary groups on user form?,1,0-Yes,1-No,2-As text box line2=Samba account options,11 samba_class=LDAP object class for Samba users,10,sambaAccount-sambaAccount (Samba 2),sambaSamAccount-sambaSamAccount (Samba 3),Other samba_def=Enabled Samba account by default?,1,1-Yes,0-No samba_domain=Domain SID for Samba3,0 samba_props=LDAP properties for new Samba users,9,40,3,\t samba_gclass=LDAP object class for Samba groups,10,-sambaGroup (Samba 2),sambaSamGroup-sambaSamGroup (Samba 3 old schema),sambaGroupMapping-sambaGroupMapping (Samba 3 new schema),Other samba_gid=Primary group SID,10,none-None,-Work out automatically line3=Cyrus IMAP server options,11 imap_class=LDAP object class for IMAP users,0 imap_def=Enabled IMAP account by default?,1,1-Yes,0-No imap_host=Cyrus IMAP server host,3,None imap_login=Administration login for IMAP server,0 imap_pass=Administration password for IMAP server,0 imap_props=LDAP properties for new IMAP users,9,40,5,\t imap_folders=Folders to create for new IMAP users,9,30,3,\t imap_folderalt=Path for folders,1,1-user.$user.$folder,0-$folder domain=Email domain for mail attribute,0,Don't add mail attributes mailfmt=Email address format,1,0-firstname.surname@domain,1-username@domain addressbook=Address book base,3,None quota_support=IMAP server supports quotas?,1,1-Yes,0-No quota=Default quota for new Cyrus users,3,None,,,kB maillocaladdress=Attribute for mail aliases,3,Default (alias) alias_same=Can two users have the same alias?,1,1-Yes,0-No line4=Before and after commands,11 pre_command=Command to run before making changes,0 post_command=Command to run after making changes,0 ldap-useradmin/config-macos0100664000567100000120000000061610664401635015746 0ustar jcameronwheelldap_host=localhost imap_login=cyrus samba_class=sambaAccount imap_class=SuSEeMailObject imap_folders=old public sent-mail md5=0 given=0 other_class=person inetorgperson top organizationalPerson extensibleObject apple-user slappasswd=slappasswd samba_def=0 imap_def=0 multi_fields=0 mailfmt=0 shells=fixed,ldap,passwd,shells secmode=0 samba_gclass=sambaGroup alias_same=0 given_class=inetOrgPerson ldap-useradmin/config0100664000567100000120000000051110664401635014640 0ustar jcameronwheelldap_host=localhost imap_login=cyrus samba_class=sambaAccount imap_class=SuSEeMailObject imap_folders=old public sent-mail md5=0 given=0 slappasswd=slappasswd samba_def=0 imap_def=0 multi_fields=0 mailfmt=0 shells=fixed,ldap,passwd,shells secmode=0 imap_folderalt=1 samba_gclass=sambaGroup alias_same=0 given_class=inetOrgPerson ldap-useradmin/search_user.cgi0100775000567100000120000000265010664401635016450 0ustar jcameronwheel#!/usr/local/bin/perl # search_user.cgi # Ask the LDAP server to return users matching some query require './ldap-useradmin-lib.pl'; &ReadParse(); # Do the search $ldap = &ldap_connect(); $base = &get_user_base(); if ($in{'match'} == 0) { $search = "($in{'field'}=$in{'what'})"; } elsif ($in{'match'} == 1) { $search = "($in{'field'}=*$in{'what'}*)"; } elsif ($in{'match'} == 2) { $search = "(!($in{'field'}=$in{'what'}))"; } elsif ($in{'match'} == 3) { $search = "(!($in{'field'}=*$in{'what'}*))"; } $rv = $ldap->search(base => $base, filter => "(&(objectClass=posixAccount)$search)"); if ($rv->code) { &error(&text('search_err', "$search", "$base", $rv->error)); } @users = $rv->all_entries; if ($in{'match'} == 6) { # Apply less-than filter manually @users = grep { $_->get_value($in{'field'}) < $in{'what'} } @users; } elsif ($in{'match'} == 7) { # Apply greater-than filter manually @users = grep { $_->get_value($in{'field'}) > $in{'what'} } @users; } if ($rv->count == 1) { # If one result, go direct to that user &redirect("edit_user.cgi?dn=".&urlize($users[0]->dn())); } else { # List matching users &ui_print_header(undef, $text{'search_title'}, ""); if (@users == 0) { print "

$text{'search_notfound'}.

\n"; } else { @ulist = map { { &dn_to_hash($_) } } @users; &useradmin::users_table(\@ulist, 0, 1, 0); } &ui_print_footer("", $text{'index_return'}); } ldap-useradmin/save_user.cgi0100775000567100000120000005443710664401635016153 0ustar jcameronwheel#!/usr/local/bin/perl # save_user.cgi # Create, update or delete an LDAP user require './ldap-useradmin-lib.pl'; use Time::Local; &ReadParse(); $ldap = &ldap_connect(); $schema = $ldap->schema(); if (!$in{'new'}) { # Get existing user $rv = $ldap->search(base => $in{'dn'}, scope => 'base', filter => '(&(objectClass=posixAccount))'); ($uinfo) = $rv->all_entries; $uinfo || &error($text{'usave_egone'}); %ouser = &dn_to_hash($uinfo); &can_edit_user(\%ouser) || &error($text{'usave_eedit'}); } else { $access{'ucreate'} || &error($text{'usave_ecreate'}); } if ($in{'mailboxes'}) { # Just re-direct to mailboxes page &redirect("../mailboxes/list_mail.cgi?user=$ouser{'user'}"); exit; } elsif ($in{'switch'}) { # Just re-direct to Usermin switch user program &redirect("../usermin/switch.cgi?user=$ouser{'user'}"); exit; } elsif ($in{'delete'}) { # Delete the user .. but ask first! &ui_print_header(undef, $text{'udel_title'}, ""); $home = $uinfo->get_value("homeDirectory"); $user = $uinfo->get_value("uid"); if ($in{'confirm'}) { # Run the before command %uhash = &dn_to_hash($uinfo); &set_user_envs(\%uhash, 'DELETE_USER', undef, undef); $merr = &making_changes(); &error(&text('usave_emaking', "$merr")) if (defined($merr)); # Work out old classes @classes = $uinfo->get_value("objectClass"); @cyrus_class_2 = split(' ',$cyrus_class); $wascyrus = &indexof($cyrus_class_2[0], @classes) >= 0; # Delete from other modules %user = &dn_to_hash($uinfo); if ($in{'others'}) { print "$text{'udel_other'}
\n"; &useradmin::other_modules("useradmin_delete_user", \%user); print "$text{'udel_done'}

\n"; } # Delete from any groups print "$text{'udel_groups'}
\n"; $base = &get_group_base(); $rv = $ldap->search(base => $base, filter => '(&(objectClass=posixGroup))'); foreach $g ($rv->all_entries) { local @mems = $g->get_value("memberUid"); local $idx = &indexof($user, @mems); if ($idx >= 0) { # Take out of this group splice(@mems, $idx, 1); $rv = $ldap->modify($g->dn(), replace => { 'memberUid' => \@mems }); if ($rv->code) { &error(&text('usave_emodgroup', $g->get_value('cn'), $rv->error)); } } } print "$text{'udel_done'}

\n"; # Delete from the LDAP db print "$text{'udel_pass'}
\n"; $rv = $ldap->delete($in{'dn'}); if ($rv->code) { &error(&text('usave_edelete', $rv->error)); } print "$text{'udel_done'}

\n"; # Delete his addressbook entry if ($config{'addressbook'} && $wascyrus) { print "$text{'udel_book'}
\n"; $err = &delete_addressbook(); if ($err) { print &text('udel_failed', $err),"

\n"; } else { print "$text{'udel_done'}

\n"; } } # Delete his home directory if ($in{'delhome'}) { print "$text{'udel_home'}
\n"; $home = $uinfo->get_value("homeDirectory"); if (-d $home && $home ne "/") { local $realhome = &resolve_links($home); local $qhome = quotemeta($realhome); system("rm -rf $qhome >/dev/null 2>&1"); unlink($home); # in case of links } print "$text{'udel_done'}

\n"; # Delete his IMAP mailbox only if home gets deleted, too if ($config{'imap_host'}) { print "$text{'udel_imap'}
\n"; $imap = &imap_connect(); $rv = $imap->delete("user.".$uinfo->get_value("uid")); $imap->logout(); print "$text{'udel_done'}

\n"; } } &made_changes(); %p = ( %in, %user ); &webmin_log("delete", "user", $user{'user'}, \%p); } else { # Show confirmation page print "

\n"; print "\n"; print "\n"; print "\n"; if ($home ne "/" && -d $home) { $size = &nice_size(&disk_usage_kb($home)*1024); print "
",&text('udel_sure', $user, $home, $size),"

\n"; print "\n"; print "\n"; } else { print "

",&text('udel_sure2', $user), "

\n"; print "\n"; } if ($user eq 'root') { print "", "$text{'udel_root'}

\n"; } if ($config{'imap_host'}) { # TODO quota anzeigen $imap = &imap_connect(); $rv = $imap->status("user.".$user, "messages"); if ($rv->{'Status'} eq 'ok') { print "

$text{'udel_warnimap'}

\n"; } $imap->logout(); } printf "
%s
\n", $mconfig{'default_other'} ? "checked" : "", $text{'udel_dothers'}; print "
\n"; } $ldap->unbind(); &ui_print_footer("", $text{'index_return'}); exit; } elsif ($in{'raw'}) { # Show all LDAP attributes for user &redirect("raw.cgi?user=1&dn=".&urlize($in{'dn'})); exit; } else { # Validate inputs &error_setup($text{'usave_err'}); $in{'user'} =~ /^[^:\t]+$/ || &error(&text('usave_ebadname', $in{'user'})); $in{'user'} =~ s/\r//g; $in{'real'} || &error($text{'usave_ereal'}); @users = split(/\n/, $in{'user'}); $user = $users[0]; $in{'uid'} =~ /^\-?[0-9]+$/ || &error(&text('usave_euid', $in{'uid'})); $uid = $in{'uid'}; $in{'real'} =~ /^[^:]*$/ || &error(&text('usave_ereal', $in{'real'})); $firstname = $in{'firstname'}; $lastname = $in{'lastname'}; $real = $in{'real'}; $shell = $in{'shell'} eq '*' ? $in{'othersh'} : $in{'shell'}; if ($in{'new'}) { &check_user_used($ldap, $user) && &error(&text('usave_einuse', $user)); } # Validate IMAP quota $quota = undef; if ($config{'quota_support'} && !$in{'quota_def'}) { $in{'quota'} =~ /^\d+$/ || &error($text{'usave_equota'}); $quota = $in{'quota'}; } # Compute and validate home directory if ($access{'autohome'}) { if ($in{'new'} || $ouser{'user'} ne $user) { $home = &auto_home_dir($access{'home'}, $user, $grp); } else { $home = $ouser{'home'}; } } elsif ($mconfig{'home_base'} && $in{'home_base'}) { $home = &auto_home_dir($mconfig{'home_base'}, $user); } else { $home = $in{'home'}; $home =~ /^\// || &error(&text('usave_ehome', $home)); } if (!$access{'autohome'}) { $home =~ /^\// || &error(&text('usave_ehome', $home)); $al = length($access{'home'}); if (length($home) < $al || substr($home, 0, $al) ne $access{'home'}) { &error(&text('usave_ehomepath', $home)); } } local $pfx = $config{'md5'} == 1 || $config{'md5'} == 3 ? "{md5}" : $config{'md5'} == 0 ? "{crypt}" : ""; if ($in{'passmode'} == 0) { # Password is blank if (!$mconfig{'empty_mode'}) { local $err = &useradmin::check_password_restrictions( "", $user); &error($err) if ($err); } $pass = ""; } elsif ($in{'passmode'} == 1) { # Password is locked $pass = $mconfig{'lock_string'}; } elsif ($in{'passmode'} == 2) { # Specific encrypted password entered, or possibly no change $pass = $in{'encpass'}; $pass = $pfx.$pass if ($pass !~ /^\{[a-z0-9]+\}/i && $pfx); } elsif ($in{'passmode'} == 3) { # Normal password entered - check restrictions local $err = &useradmin::check_password_restrictions( $in{'pass'}, $user); &error($err) if ($err); $pass = $pfx.&encrypt_password($in{'pass'}); $plainpass = $in{'pass'}; } if ($in{'disable'} && ($in{'passmode'} == 2 || $in{'passmode'} == 3)) { $pass = $useradmin::disable_string.$pass; } if ($in{'gid'} =~ /^\d+$/) { $gid = $in{'gid'}; } else { $gid = &all_getgrnam($in{'gid'}); defined($gid) || &error(&text('usave_egid', $in{'gid'})); } # Build useradmin-style hash of user details local %uhash = ( 'user' => $user, 'uid' => $uid, 'gid' => $gid, 'group' => $in{'group'}, 'real' => $real, 'shell' => $shell, 'pass' => $pass, 'plainpass' => $plainpass, 'home' => $home ); if ($in{'new'}) { defined(&all_getpwnam($user)) && &error(&text('usave_einuse', $user)); if ($in{'passmode'} == 1 || $in{'passmode'} == 2) { if ($in{'cyrus'}) { &error($text{'usave_ecyruspass'}); } } # Run the pre-change command &set_user_envs(\%uhash, 'CREATE_USER', $in{'passmode'} == 3 ? $in{'pass'} : "", undef); $merr = &making_changes(); &error(&text('usave_emaking', "$merr")) if (defined($merr)); # Create home dir if (!-e $home && $in{'makehome'}) { &lock_file($home); mkdir($home, oct($mconfig{'homedir_perms'})) || &error(&text('usave_emkdir', $!)); chmod(oct($mconfig{'homedir_perms'}), $home) || &error(&text('usave_echmod', $!)); chown($uid, $gid, $home) || &error(&text('usave_echown', $!)); &unlock_file($home); } # Get configured properties for new users local @props = &split_props($config{'props'}, \%uhash); if ($in{'cyrus'}) { push(@props, &split_props($config{'imap_props'}, \%uhash)); } # Build Samba-related properties if ($in{'samba'}) { &samba_properties(1, \%uhash, $in{'passmode'}, $in{'pass'}, $schema, \@props, $ldap); } if ($in{'cyrus'}) { # Build mail-related properties &mail_props(); } # Add any extra LDAP fields &parse_extra_fields($config{'fields'}, \@props, \@rprops, $ldap); # Add shadow LDAP fields $shadow = &shadow_fields(); # Add to the ldap database @classes = ( "posixAccount", "shadowAccount" ); push(@classes, split(/\s+/, $config{'other_class'})); push(@classes, $samba_class) if ($in{'samba'}); push(@classes, split(' ',$cyrus_class)) if ($in{'cyrus'}); &name_fields(); @classes = &unique(@classes); $base = &get_user_base(); $newdn = "uid=$user,$base"; $rv = $ldap->add($newdn, attr => [ "cn" => $real, "uid" => \@users, "uidNumber" => $uid, "loginShell" => $shell, "homeDirectory" => $home, "gidNumber" => $gid, "userPassword" => $pass, "objectClass" => \@classes, @props ]); if ($rv->code) { &error(&text('usave_eadd', $rv->error)); } if ($in{'cyrus'}) { if ($config{'addressbook'}) { # Create addressbook entry &setup_addressbook(\%uhash); } # Disconnect to save the changes $ldap->unbind(); undef($ldap); # Create imap account &setup_imap(\%uhash, $quota); # Re-connect for later LDAP operations $ldap = &ldap_connect(); } # Copy files into user's directory if ($in{'makehome'} && $mconfig{'user_files'}) { local $uf = $mconfig{'user_files'}; local $shell = $user{'shell'}; $shell =~ s/^(.*)\///g; $uf =~ s/\$group/$in{'gid'}/g; $uf =~ s/\$gid/$user{'gid'}/g; $uf =~ s/\$shell/$shell/g; &useradmin::copy_skel_files($uf, $home, $uid, $gid); } } else { # Modifying a user $olduser = $uinfo->get_value('uid'); if ($olduser ne $user) { defined(&all_getpwnam($user)) && &error(&text('usave_einuse', $user)); } # Work out old settings @classes = $uinfo->get_value("objectClass"); $wassamba = &indexof($samba_class, @classes) >= 0; @cyrus_class_2 = split(' ',$cyrus_class); $wascyrus = &indexof($cyrus_class_2[0], @classes) >= 0; if ($in{'passmode'} == 1 || $in{'passmode'} == 2) { if (!$wascyrus && $in{'cyrus'}) { &error($text{'usave_ecyruspass'}); } } # Run the pre-change command &set_user_envs(\%uhash, 'MODIFY_USER', $in{'passmode'} == 3 ? $in{'pass'} : "", undef); $merr = &making_changes(); &error(&text('usave_emaking', "$merr")) if (defined($merr)); # Rename home dir, if needed $oldhome = $uinfo->get_value("homeDirectory"); if ($home ne $oldhome && -d $oldhome && !-e $home && $in{'movehome'}) { $out = `mv '$oldhome' '$home' 2>&1`; if ($?) { &error(&text('usave_emove', $out)); } } # Change GID on files if needed $oldgid = $uinfo->get_value("gidNumber"); $olduid = $uinfo->get_value("uidNumber"); if ($oldgid != $gid && $in{'chgid'}) { if ($in{'chgid'} == 1) { &useradmin::recursive_change($home, $olduid, $oldgid, -1, $gid); } else { &useradmin::recursive_change("/", $olduid, $oldgid, -1, $gid); } } # Change UID on files if needed if ($olduid != $uid && $in{'chuid'}) { if ($in{'chuid'} == 1) { &useradmin::recursive_change($home, $olduid, -1, $uid, -1); } else { &useradmin::recursive_change("/", $olduid, -1, $uid, -1); } } # Get properties for modified users local @props = &split_props($config{'mod_props'}, \%uhash); # Work out samba-related property changes $oldpass = $uinfo->get_value('userPassword'); if ($in{'samba'}) { # Is a samba user .. add or update props $passmode = $in{'passmode'}; if ($passmode == 2 && $wassamba && $in{'encpass'} eq $oldpass) { # Not being changed $passmode = 4; } &samba_properties(!$wassamba, \%uhash, $passmode, $in{'pass'}, $schema, \@props); } elsif ($wassamba) { # Is no longer a samba user .. take away standard # samba properties &samba_removes(\%uhash, $schema, \@rprops); } # Work out imap-related property changes if ($in{'cyrus'}) { &mail_props(); } if ($in{'cyrus'} && !$wascyrus) { # Add any extra properties for IMAP users push(@props, &split_props($config{'imap_props'})); } elsif (!$in{'cyrus'} && $wascyrus) { # Take away properties for IMAP users push(@rprops, &split_first($config{'imap_props'})); &delete_mail_props(); } # Add or update any extra LDAP fields &parse_extra_fields($config{'fields'}, \@props, \@rprops, $ldap, $in{'dn'}); # Add or update shadow LDAP fields $shadow = &shadow_fields(); # Update the ldap database if ($in{'samba'}) { push(@classes, $samba_class); } else { @classes = grep { $_ ne $samba_class } @classes; } if ($in{'cyrus'}) { push(@classes, split(' ',$cyrus_class)); } else { @cyrus_class_4 = split(' ',$cyrus_class); foreach $one_cyrus_class (@cyrus_class_4) { @classes = grep { $_ ne $one_cyrus_class } @classes; } } push(@classes, "shadowAccount") if ($shadow); &name_fields(); @classes = &unique(@classes); @rprops = grep { defined($uinfo->get_value($_)) } @rprops; $newdn = $in{'dn'}; $rv = $ldap->modify($in{'dn'}, replace => { "cn" => $real, "uid" => \@users, "uidNumber" => $uid, "loginShell" => $shell, "homeDirectory" => $home, "gidNumber" => $gid, "userPassword" => $pass, "objectClass" => [ &unique(@classes) ], @props }, 'delete' => \@rprops); if ($rv->code) { &error(&text('usave_emod', $rv->error)); } if ($olduser ne $user) { # Need to rename the LDAP dn itself $renaming = 1; $base = &get_user_base(); $newdn = "uid=$user,$base"; $rv = $ldap->moddn($in{'dn'}, newrdn => "uid=$user"); if ($rv->code) { &error(&text('usave_emoddn', $rv->error)); } # Check if an addressbook dn exists local $olda = "ou=$olduser, $config{'addressbook'}"; $rv = $ldap->search(base => $olda, scope => 'base', filter => '(&(objectClass=organizationalUnit))'); ($oldbook) = $rv->all_entries; if ($oldbook) { # Need to rename the addressbook dn $rv = $ldap->modify($olda, replace => { "ou" => $user }); if ($rv->code) { &error(&text('usave_emodbook', $rv->error)); } $rv = $ldap->moddn($olda, newrdn => "ou=$user"); if ($rv->code) { &error(&text('usave_emodbookdn', $rv->error)); } } } if ($in{'cyrus'} && !$wascyrus) { # Adding IMAP support if ($config{'addressbook'}) { # Create addressbook entry &setup_addressbook(); } # Setup the imap account as well &setup_imap(\%uhash, $quota); } elsif (!$in{'cyrus'} && $wascyrus) { # Removing IMAP support if ($config{'addressbook'}) { # Delete addressbook entry &delete_addressbook(); } } elsif ($in{'cyrus'} && $wascyrus) { # Changing IMAP support if (!$in{'quota_def'}) { &set_imap_quota(\%uhash, $in{'quota'}); } } } if ($config{'secmode'} != 1) { # Update any groups that the user has been added to/removed from @sgnames = $config{'secmode'} == 2 ? split(/\s+/, $in{'sgid'}) : split(/\0/, $in{'sgid'}); foreach $gname (@sgnames) { $ingroup{$gname}++; } $base = &get_group_base(); $rv = $ldap->search(base => $base, filter => '(&(objectClass=posixGroup))'); foreach $g ($rv->all_entries) { local @mems = $g->get_value("memberUid"); local $gname = $g->get_value("cn"); if ($renaming) { local $idx = &indexof($olduser, @mems); if ($ingroup{$gname} && $idx<0) { # Need to add to the group push(@mems, $user); } elsif (!$ingroup{$gname} && $idx>=0) { # Need to remove from the group splice(@mems, $idx, 1); } elsif ($idx >= 0) { # Need to rename in group $mems[$idx] = $user; } else { next; } } else { local $idx = &indexof($user, @mems); if ($ingroup{$gname} && $idx<0) { # Need to add to the group push(@mems, $user); } elsif (!$ingroup{$gname} && $idx>=0) { # Need to remove from the group splice(@mems, $idx, 1); } else { next; } } # Actually change the group $rv = $ldap->modify($g->dn(), replace => { 'memberUid' => \@mems }); if ($rv->code) { &error(&text('usave_emodgroup', $g->get_value('cn'), $rv->error)); } } } # Get the updated user object $rv = $ldap->search(base => $newdn, scope => 'base', filter => '(&(objectClass=posixAccount))'); ($uinfo) = $rv->all_entries; %user = &dn_to_hash($uinfo); # Run post-change script &set_user_envs(\%user, $in{'new'} ? 'CREATE_USER' : 'MODIFY_USER', $in{'passmode'} == 3 ? $in{'pass'} : "", undef); &made_changes(); # Run other modules' scripts if ($in{'others'}) { $user{'passmode'} = $in{'passmode'}; if ($in{'passmode'} == 2 && $user{'pass'} eq $ouser{'pass'}) { # not changing password $user{'passmode'} = 4; } $user{'plainpass'} = $in{'pass'} if ($in{'passmode'} == 3); $ldap->unbind(); # force commit? if (!$in{'new'}) { $user{'olduser'} = $ouser{'user'}; &useradmin::other_modules("useradmin_modify_user", \%user, \%ouser); } else { &useradmin::other_modules("useradmin_create_user", \%user); } } } $ldap->unbind(); delete($in{'pass'}); delete($in{'passmode'}); &webmin_log(!$in{'new'} ? 'modify' : 'create', 'user', $user, \%in); &redirect($in{'return'} || ""); # mail_props() # Add properties for mail and aliases sub mail_props { # Do nothing if no domain is set return if (!$config{'domain'}); # Add surname and first name details local ($autofirstname, $autolastname); if ($firstname && $lastname) { $autofirstname = $firstname; $autolastname = $lastname; } elsif ($in{'real'} =~ /(\S+)\s+(\S+)$/) { $autofirstname = lc($1); $autolastname = lc($2); } elsif ($in{'real'} =~ /(\S+)/) { $autofirstname = lc($1); } else { $autofirstname = lc($in{'user'}); } if ($autolastname) { if (&in_schema($schema, "mail")) { if ($config{'mailfmt'} == 0) { push(@props, "mail", "$autofirstname.$autolastname\@$config{'domain'}") } else { push(@props, "mail", "$user\@$config{'domain'}") } } } else { push(@props, "mail", "$autofirstname\@$config{'domain'}") if (&in_schema($schema, "mail")); } # Add extra aliases local $aattr = $config{'maillocaladdress'} || "alias"; if (&in_schema($schema, $aattr)) { local @alias = split(/\s+/, $in{'alias'}); if ($in{'alias'}) { if (!$config{'alias_same'}) { ($dup, $dupwhat) = &check_duplicates($ldap, $aattr, \@alias, $in{'dn'}); $dup && &error(&text('save_ealiasdup', $dupwhat, $dup->dn())); } push(@props, $aattr, \@alias); } else { push(@rprops, $aattr); } } local $battr = $config{'mailroutingaddress'}; push(@props, $battr, lc($in{'user'})."\@$config{'imap_host'}") if ($battr ne "") && (&in_schema($schema, $battr)); } # delete_mail_props() # Take away any extra properties added by mail_props sub delete_mail_props { local $aattr = $config{'maillocaladdress'} || "alias"; if (&in_schema($schema, $aattr)) { push(@rprops, $aattr); } local $battr = $config{'mailroutingaddress'}; if (($battr ne "") && &in_schema($schema, $battr)) { push(@rprops, $battr); } push(@rprops, "mail") if (&in_schema($schema, "mail")); } sub delete_addressbook { return &delete_ldap_subtree($ldap, "ou=$user, $config{'addressbook'}"); } sub name_fields { if ($config{'given'}) { if ($firstname) { if (&in_schema($schema, "gn")) { push(@props, "gn", $firstname); } elsif (&in_schema($schema, "givenName")) { push(@props, "givenName", $firstname) } } if ($lastname && &in_schema($schema, "sn")) { push(@props, "sn", $lastname); } if ($firstname || $lastname) { push(@classes, $config{'given_class'}); } } if (&in_schema($schema, "gecos")) { push(@props, "gecos", &remove_accents($in{'real'})); } } sub shadow_fields { if (&in_schema($schema, "shadowLastChange")) { # Validate shadow-password inputs $in{'min'} =~ /^\-?[0-9]*$/ || &error(&text('usave_emin', $in{'min'})); if ($in{'min'} ne '') { push(@props, "shadowMin", $in{'min'}); } else { push(@rprops, "shadowMin"); } $in{'max'} =~ /^\-?[0-9]*$/ || &error(&text('usave_emax', $in{'max'})); if ($in{'max'} ne '') { push(@props, "shadowMax", $in{'max'}); } else { push(@rprops, "shadowMax"); } if ($in{'expired'} ne "" && $in{'expirem'} ne "" && $in{'expirey'} ne "") { eval { $expire = timelocal(0, 0, 12, $in{'expired'}, $in{'expirem'}-1, $in{'expirey'}-1900); }; if ($@) { &error($text{'usave_eexpire'}); } push(@props, "shadowExpire", int($expire / (60*60*24))); } else { push(@rprops, "shadowExpire"); } $in{'warn'} =~ /^\-?[0-9]*$/ || &error(&text('usave_ewarn', $in{'warn'})); if ($in{'warn'} ne '') { push(@props, "shadowWarning", $in{'warn'}); } else { push(@rprops, "shadowWarning"); } $in{'inactive'} =~ /^\-?[0-9]*$/ || &error(&text('usave_einactive', $in{'inactive'})); if ($in{'inactive'} ne '') { push(@props, "shadowInactive", $in{'inactive'}); } else { push(@rprops, "shadowInactive"); } if ($in{'passmode'} == 3 || $in{'passmode'} == 2 && $pass ne $oldpass) { $daynow = int(time() / (60*60*24)); push(@props, "shadowLastChange", $daynow); } return 1; } else { return 0; } } ldap-useradmin/search_group.cgi0100775000567100000120000000240710664401635016626 0ustar jcameronwheel#!/usr/local/bin/perl # search_group.cgi # Ask the LDAP server to return groups matching some query require './ldap-useradmin-lib.pl'; &ReadParse(); # Do the search $ldap = &ldap_connect(); $base = &get_group_base(); if ($in{'match'} == 0) { $search = "($in{'field'}=$in{'what'})"; } elsif ($in{'match'} == 1) { $search = "($in{'field'}=*$in{'what'}*)"; } elsif ($in{'match'} == 2) { $search = "(!($in{'field'}=$in{'what'}))"; } elsif ($in{'match'} == 3) { $search = "(!($in{'field'}=*$in{'what'}*))"; } $rv = $ldap->search(base => $base, filter => "(&(objectClass=posixGroup)$search)"); if ($rv->code) { &error(&text('search_err', "$search", "$base", $rv->error)); } @groups = $rv->all_entries; if ($in{'match'} == 6) { # Apply less-than filter manually @groups = grep { $_->get_value($in{'field'}) < $in{'what'} } @groups; } elsif ($in{'match'} == 7) { # Apply greater-than filter manually @groups = grep { $_->get_value($in{'field'}) > $in{'what'} } @groups; } &ui_print_header(undef, $text{'search_title'}, ""); if (@groups == 0) { print "

$text{'search_gnotfound'}.

\n"; } else { @glist = map { { &dn_to_hash($_) } } @groups; &useradmin::groups_table(\@glist, 0, 1); } &ui_print_footer("", $text{'index_return'}); ldap-useradmin/config-debian-squirrelmail-linux0100664000567100000120000000075410664401635021735 0ustar jcameronwheelauth_ldap=/etc/ldap/ldap.conf imap_login=cyrus samba_class=sambaSamAccount imap_class=SquirrelMailUser inetLocalMailRecipient imap_folders=old public sent-mail md5=0 given=0 slappasswd=slappasswd maillocaladdress=mailLocalAddress mailroutingaddress=mailRoutingAddress mailsyntax_first=$firstname mailsyntax_sep=. mailsyntax_last=$surname samba_def=0 imap_def=0 multi_fields=0 mailfmt=0 shells=fixed,ldap,passwd,shells secmode=0 samba_gclass=sambaGroup alias_same=0 given_class=inetOrgPerson ldap-useradmin/help/0040775000567100000120000000000010664401636014407 5ustar jcameronwheelldap-useradmin/help/intro.html0100664000567100000120000000331310664401635016424 0ustar jcameronwheel

LDAP Users and Groups
If your system is configured to use an LDAP server for storing Unix users and groups, this module can be used to manage users in an LDAP database. LDAP is often used as an alternative to NIS for synchronizing user information across multiple systems in a network, as a database can store additional attributes for each user in addition to the standard Unix username, shell and so on.

Naturally, an LDAP server must be running on your system or on some host on your network for this module to be used. In addition, one or most hosts must be configured to use LDAP for user and/or group authentication. Neither of these tasks can be done from within the module - they must be done manually, or with other Webmin modules for the purpose.

If you have Samba configured to use an LDAP server as well, this module can also create and manage the necessary password attributes for each LDAP user to be able to login to the Samba server as well. For this feature to work, your LDAP server must be configured to support the additional Samba attributes and object class for each user in its schema. Only when the Samba login? option is set to Yes will the Samba attributes be created.

The module can also create users on a Cyrus IMAP server, if it is set up to authenticate against the same LDAP database. It will create mailboxes for each new user, subscribe the user to his mailboxes and grant admin access to them. If an LDAP user is deleted, his IMAP mailbox will be as well. Currently this feature only works with the Cyrus IMAP server - it has not been tested and is probably not even necessary for other servers, which use users' home directories for mail storage.


ldap-useradmin/help/intro.ca.html0100644000567100000120000000364210664401635017011 0ustar jcameronwheel
Usuaris i Grups LDAP
Si el sistema est configurat per a utilitzar un servidor LDAP per a emmagatzemar usuaris i grups Unix,es pot utilitzar aquest mdul per gestionar els usuaris d'una base de dades LDAP. LDAP es fa servir sovint com una alternativa a NIS per a sincronitzar la informaci dels usuaris a travs de mltiples sistemes d'una xarxa, com una base de dades que pot emmagatzemar atributs addicionals per a cada usuari, a ms a ms dels estndards Unix nom d'usuari, shell, i altres.

Naturalment, hi ha d'haver un servidor LDAP executant-se al sistema o en algun host de la xarxa per poder fer servir aquest mdul. A ms a ms, cal configurar un o ms hosts per a utilitzar LDAP per autenticar usuaris i/o grups. No es pot fer cap d'aquestes tasques des d'aquest mdul -s'han de fer manualment, o amb altres mduls Webmin per aquest propsit.

Si tamb tens Samba configurat per utilitzar un servidor LDAP, aquest mdul pot tamb crear i gestionar els atributs de contrasenyes necessaris per tal que cada usuari LDAP pugui entrar tamb al servidor Samba. Per tal que aquesta caracterstica funcioni, s'ha de configurar el servidor LDAP per suportar els atributs addicionals Samba i la classe d'objecte per a cada usuari en el seu esquema. Noms es crearam les atributs Samba quan l'opci Usuaris Samba estigui a S.

El mdul tamb pot crear usuaris en un servidor IMAP Cyrus, si est configurat per a l'autenticaci contra la mateixa base de dades LDAP. Crear bsties per a cada nou usuari, subscriur l'usuari a les seves bsties i li donar permisos d'administrador sobre les mateixes. Si se suprimeix un usuari LDAP, la seva bstia IMAP tamb ho ser. Actualment, aquesta caracterstica noms funciona amb el servidor IMAP Cyrus - no s'ha provat i probablement no sigui necessari per altres servidors, que fan servir el directori arrel de l'usuari per a emmagatzemar el correu.


ldap-useradmin/help/config_mod_props.html0100664000567100000120000000121010664401635020612 0ustar jcameronwheel
LDAP properties for all modified users
This option can be used to specifiy properties that will be updated in LDAP users when they are modified. They must be entered in the following format :

name1: value1
name2: value2

The following substitutions can be used, which are replaced when the user is saved :

${USER} The user's login name
${PLAINPASS} The user's un-encrypted password, if one was given
${REAL} The user's real name
${UID} The user's Unix UID number
${GID} The user's Unix group ID number
${HOME} The user's home directory
${SHELL} The user's login shell