[Fedora-directory-devel] Using Directory Client without an admin server running

Richard Megginson rmeggins at redhat.com
Thu Jun 19 23:19:58 UTC 2008


Sztupák Sz. Zsolt wrote:
> Hi!
>
> I was just curious: Is it officially possible to use the directory 
> client for LDAP-related jobs without having an admin server running? I 
> mean most of the things you'll use the client for is LDAP related 
> (adding-removing users, changing attributes, changing ACLs, etc.), and 
> there is no need for an admin server to be running.
>
> Unofficially I managed to hack a small groovy script that will run the 
> DS client (inside fedora-ds-1.1.jar) and connect to a server. Browsing 
> the directory and changing attributes works, but adding a new entry, 
> or changing ACL-s will crash the program (but I'm trying to figure out 
> why). You still need an "o=netscaperoot" base in your LDAP directory, 
> but at least the admin server need not be running (we are running a 
> service on a Gentoo Linux based machine with Lighttpd, and don't want 
> to use/install Apache).
Yes, it should work.  I would first suggest taking a look at the main 
Console code - there used to be a command line switch that would allow 
you to go directly to the server you wanted to edit, and pass in the 
admin auth credentials too.  It's that auth part that may require the 
admin server.

Please paste the output of running your script to fpaste.org and paste 
the link here - perhaps we can help debug it.
>
> SztupY
>
> console.groovy:
> // create a fedora-ds-1.1.jar in your home directory containing all 
> classes (merge all jar files IDM uses into one named 
> fedora-ds-1.1.jar) for this script to work
> import com.netscape.admin.dirserv.DSAdmin;
> import com.netscape.management.client.console.*;
> import com.netscape.management.client.util.Debug;
> import java.awt.*;
> import netscape.ldap.*;
> com.netscape.management.client.util.Debug.setTraceLevel(9);
> DSAdmin d = new DSAdmin();
> ConsoleInfo i = new 
> ConsoleInfo("HOST_NAME",389,"USER_NAME","PASSWORD","o=NetscapeRoot");
> LDAPConnection c = new LDAPConnection();
> c.connect("HOST_NAME",389,"USER_NAME","PASSWORD");
> i.setLDAPConnection(c);
> i.setCurrentDN("cn=SERVER_NAME,cn=fedora directory server,cn=server 
> group,cn=HOST_NAME,o=netscaperoot");
> i.setAdminOS("Windows"); // in Windows
> d.initialize(i);
> Component cc = d.getCustomPanel();
> d.select(null);
> d.run(null);  
> -- 
> Fedora-directory-devel mailing list
> Fedora-directory-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20080619/c734c2aa/attachment.bin>


More information about the Fedora-directory-devel mailing list