How to create users

4 views
Skip to first unread message

Pablo Inostroza

unread,
May 8, 2008, 3:07:42 PM5/8/08
to OpenAnzo
Hello OpenAnzo team

I've checked out the current source code of OpenAnzo 3.0. In the
programming guide of the previous version, there is an example that
shows how to create users:

User userJastorObj =
AnzoFactory.createUser(newUser,systemGraph.getMetaDataGraph());
userJastorObj.setDefaultRole(newUserDefaultRole);
userJastorObj.setPassword(newUserPwd);
userJastorObj.setUserId(newUserId);

Unfortunately, in the version I've checked out, the
org.openanzo.common.ontology.AnzoFactory class doesn't have the method
createUser. How can I create an user?

Thank you in advance,

Pablo Inostroza

Matthew Roy

unread,
May 8, 2008, 3:22:21 PM5/8/08
to open...@googlegroups.com
Hi Pablo,
One of the big changes from v2.5 to v3.0 was the moving of
users/password information from internal Anzo data to an ldap store.
This allows for tighter integration with a companies existing ldap
enviornment if they have one. The standard standalone server has an
embedded ldap server that starts-up when the server starts. The first
time the server is started, it loads the the ldap server with the
initial users contained within the conf/anzo.ldif file. This is a
standard ldap ldif formated file, which contains the default
users/passwords and group membership. The quickest way to add a user is
to stop the server, delete the conf/ldap-anzo directory, and edit the
anzo.ldif file to contain the new data, ie:

dn: uid=pablo,ou=users,dc=openanzo,dc=org
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: top
cn: Pablo
description: Default
sn: Pablo
uid: pablo
userpassword: 345

and add that user to the users group:

dn: cn=users,ou=groups,dc=openanzo,dc=org
description: Users
objectClass: groupOfNames
objectClass: top
member: uid=sysadmin,ou=users,dc=openanzo,dc=org
member: uid=default,ou=users,dc=openanzo,dc=org
member: uid=pablo,ou=users,dc=openanzo,dc=org
cn: users

On the next startup, the ldap server will load in this set of data, and
you will have the new users. The other way is to connect to the ldap
server using standard ldap tools, and add the user the standard ldap
way. The internal ldap server runs on port 10389, and I think you would
use user:sysadmin,ou=users,dc=openanzo,dc=org passwod:123.

Hope that helps.
Matt

Pablo Inostroza

unread,
May 8, 2008, 11:34:23 PM5/8/08
to OpenAnzo
Hi Matthew,

thanks for the quick response. I'll use a ldap tool to add the new
users.

Best regards

Pablo
Reply all
Reply to author
Forward
0 new messages