1

Is there any way that we can programatically create a Documentum user by using Active Directory information? (I have very little knowledge on ADT and know that it stores user info thats all.)

palacsint
  • 28,416
  • 10
  • 82
  • 109
RAJ
  • 123
  • 5
  • 16

3 Answers3

3

In Documentum Administrator you can sync the ActiveDirectory Users by running the Job dm_LDAPSynchronization. This should do.

Hope this helps, Max


edit: You can also create a User using DFC-Methods:

IDfUser newUser = (IDfUser) session.newObject("dm_user");

newUser.setUserName("New User");
newUser.setUserLoginName("newuser");

newUser.setString("user_source","inline password");
newUser.setString("user_password","new_password");

newUser.setDefaultFolder("/newuser",true);

newUser.save();

Instead of putting inline_password as the user_source, you probably can choose LDAP and remove the user_password. This most probably needs more information, but I don't have the DFC Documentation with me at the moment. I could look it up in the evening, but for now this should give you a good point to start.

You could also make a Server Method out of it and assign it to a custom Job.

BUT: I don't think that you can CREATE new LDAP-Users from Documentum...they need to be present in the ActiveDirectory when you import them into Documentum!

Cheers, Max

Jason Pather
  • 1,127
  • 2
  • 12
  • 18
Max
  • 1,000
  • 1
  • 11
  • 25
  • But what if we want only few user requested ,, my point is can we modify it to accept user according to our will – RAJ Jan 24 '12 at 11:44
  • That is Like can we do changes in the source file(or create a custom job) so that it pick the user from a provided xls sheet, or documnet and populates all the attribute of user into Documnetum – RAJ Jan 24 '12 at 11:54
  • hey max one quick question, When you create this method , and you have a session created , how do you use both to run the method in content server – RAJ Feb 03 '12 at 09:01
  • hey raj. just to be sure: have you created a server method and wrapped this server method in a job? – Max Feb 03 '12 at 09:28
  • No I was wondering can we execute this method without a Custom JOb, I mean like directly Login to server and do your thing – RAJ Feb 03 '12 at 09:37
  • Well, this would be a "normal" DFC method then? If you setup a valid context (dfc.properties, classpath, etc.) you can just use a SessionManager in order to login and execute your commands. If you have a ServerMethod, but do not have a Job, you can also use DA and navigate towards the ServerMethods and rund them from there. But, to be honest, if you already have a ServerMethod, creating a Job is not really a big thing and makes life very much easier. – Max Feb 03 '12 at 09:42
  • I agree, but I typically like to create and Run the code immediately, rather than putting JAva code in Job every time... – RAJ Feb 03 '12 at 09:57
  • Okay, if you are fine with it. The advantage of the job would also be the scheduler and predefined method arguments, but as long as it does what you want it to do - fine for me :) so will you end up having a jar somewhere or will you directly run it out of eclipse every time? – Max Feb 03 '12 at 10:02
  • I agree, but I typically like to create and Run the code immediately, rather than putting JAVA code in Job every time...Do you have any refrence manual how to run this code or just provide me the understanding of code after you have created session...if thats too much silly to ask :D just provide me guid to do o – RAJ Feb 03 '12 at 10:06
  • First I want to test it from Eclipse, if it run fine < i will go for Jobs, but need to test it first in dev – RAJ Feb 03 '12 at 10:12
  • Raj, I am not sure, if we understand each other correctly ;) For DFC you already did it using IDfClient, IDfSessionManager, IDfLoginInfo and creating the users as above, right? If I understood you correctly, you want to have a standalone Java Class that logs into the content server and creates some users. Imho, that is exactly the same. OR: are you using a ServerMethod? In that case, you have implemented IDmMethod and the execute()-Method, right? In there, you need to establish a session the same way. Here is an old, but most probably still valid, whitepaper by EMC: http://tinyurl.com/7vlq52g – Max Feb 03 '12 at 10:22
  • Hi,Max, I used the code that you provided, It works , fine but when I used the LDAP method, I get exception that User Login domain is not set,(its domain doesnt the code is supposed to take from LDAp), I dont find the atrributr, newUser.LginDomain(or anything related to Domain) – RAJ Feb 06 '12 at 08:33
  • Hi Raj, try setUserOSName(). Maybe this is what you are looking for. Cheers, – Max Feb 06 '12 at 13:38
  • newUser.setString("user_os_domain", "**"); this resolved my issue, its in documentum 6.5 ypu need to give unique domain or else we get a exception – RAJ Feb 06 '12 at 13:47
  • yup, One last thing, when you create user using LDAP, I dont see the values(attributes like Username loginname domain name) of LDAp getting populated into the documentum user ..do you know if there is any way to do that? – RAJ Feb 07 '12 at 08:06
1

You can configure LDAP through DA and set all the connection info, user id password and than configure the ldapsync job to do this ,whenever a new user is added into ldap,it will be imported into documentum by that job and deactivated if user is removed from ldap.

Thats the best way to avoid any programming .

-1

The LDAP synchronization is quite limited and shortsighted. You can concatenate two LDAP attributes for a user like this : ${sn}_${givenname}@company.com. You can also substring, starting from left to a given number. Thats it. No more. I wonder why they bothered.

A proper solution would have been standarsing on a expression language - all from XQuery to RegEx. There are lots to choose from.

Florent
  • 12,310
  • 10
  • 49
  • 58