Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import tool for CE10

Status
Not open for further replies.

robnmo

Programmer
Jan 14, 2004
7
US
Hi,
I am going to roll out CE10 to over 300 users. I am using Enterprise Authentication, and most users are going to Access an ORACLE 9.2 DB. Does anyone know of a way that I can import users from a ORACLE table to CE?

No using NT or LDAP authentication can't be done for this part of the project.

Thanks
 
Hi,
AFAIK, no....

Do the Oracle users need to be individually identified in CE for some reason?

[profile]

 
You would need to write some code to get the names (and passwords?) from Oracle, you can then modify the code below to pass the information into the AddNewUser function.

Code:
<%@ Language=VBScript%>

<HTML>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

<%

' This example demonstrates how to add a user.  
' Objects demonstrated by this example:
' InfoObjects Collection
' InfoObjects.Add method
' IStore.Commit method
' User object (All properties except for Aliases and groups).
'================================================

Function AddNewUser(IStore, Name, Description, FullName, Password, PasswordExpires, ChangePasswordAtNextLogon, AllowChangePassword, Connection)

' This function adds a new user to the system.
' Parameters:
' IStore (InfoStore) - The InfoStore object.
' Name (string) - The name of the new user.
' Description (string) - The description of the new user.
' FullName (string) - The full name of the new user.
' Password (string) - The password for the new user.
' PasswordExpires (boolean) - Sets whether the users password expires.
' ChangePasswordAtNextLogon (boolean) - Sets whether the user has to change password at next logon.
' AllowChangePassword (boolean) - Sets whether the user is able to change their password.
' AllowChangePassword (CEConnectionType) - Sets whether the user is a current or named user.
' Returns: Nothing.


On Error Resume Next

   ' Get the User Plugin library and add a new User object.
   Set PluginMgr = IStore.PluginManager
   Set UserPlugin = PluginMgr.PluginInfo("CrystalEnterprise.User")
   Set NewUsers  = IStore.NewInfoObjectCollection()
   NewUsers.Add (UserPlugin)


   ' Get the new User object for base properties and
   ' get the interface object for specific user properties.

   Set NewUser = NewUsers.Item(1) 
   Set NewUserInterface = NewUser.PluginInterface("")
  
   'Set user name, description.
   NewUser.Title = Name
   NewUser.Description = Description

   'Set user specific properties.

   NewUserInterface.FullName = FullName
   NewUserInterface.PasswordExpires = PasswordExpires
   NewUserInterface.AllowChangePassword =  AllowChangePassword
   NewUserInterface.ChangePasswordAtNextLogon = ChangePasswordAtNextLogon
   NewUserInterface.Connection = Connection
   NewUserInterface.NewPassword = Password

   'Save the user to the system.
   IStore.Commit NewUsers
   If (Err.Number = 0) Then
       Response.Write "<BR>User '" & NewUser.Title & "' successfully created."
   Else
      Response.Write "<BR>Error creating User - Permission not granted, or invalid Data."
   End If       

End Function

Function Main()

    ' If the infostore object is not found then display an error message.
    If ((Not IsObject(Session("IStore"))) or (isNull(Session("IStore")))) Then
        Response.Write  "Example failed: try logging on first!" 
        Exit Function
    Else
        'Retrieve the InfoStore object.
        Set IStore = Session("IStore")
    End If

   Response.Write "<H2>Example - Adding and removing users</H2>"

   AddNewUser IStore, "Joe Schmoe", "A very special person.", "Joe Schmoe", "Password", true, true,  true, 1

   Response.Write "</FORM>"    

End Function


Main ()

%>

Kingfisher
 
Hi,
The password for a user is encrypted when stored in Oracle,( for obvious reasons) so it is not accessable by a simple query...


So, you could set a common CE password for each user and force a change on first login...

[profile]

 
Thanks,
Actually all the user ids are stored in a ORACLE table, and we already planned on using a common password and forcing a change the first time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top