downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<Constants for OptionsKADM5 Functions>
Last updated: Thu, 26 Jun 2008

Examples

This simple example shows how to connect, query, print resulting principals and disconnect from a KADM5 database.

Example #1 KADM5 extension overview example

<?php

  $handle
= kadm5_init_with_password("afs-1", "GONICUS.LOCAL", "admin/admin", "password");

  print
"<h1>get_principals</h1>\n";
 
$principals = kadm5_get_principals($handle);
  for(
$i=0; $i<count($principals); $i++)
     print
"$principals[$i]<br>\n";

  print
"<h1>get_policies</h1>\n";
 
$policies = kadm5_get_policies($handle);
  for(
$i=0; $i<count($policies); $i++)
     print
"$policies[$i]<br>\n";

  print
"<h1>get_principal burbach@GONICUS.LOCAL</h1>\n";

 
$options = kadm5_get_principal($handle, "burbach@GONICUS.LOCAL" );
 
$keys = array_keys($options);
  for(
$i=0; $i<count($keys); $i++) {
  
$value = $options[$keys[$i]];
   print
"$keys[$i]: $value<br>\n";
  }

 
$options = array(KADM5_PRINC_EXPIRE_TIME => 0);
 
kadm5_modify_principal($handle, "burbach@GONICUS.LOCAL", $options);

 
kadm5_destroy($handle);
?>



add a noteadd a note User Contributed Notes
Examples
There are no user contributed notes for this page.




<Constants for OptionsKADM5 Functions>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs