1 Reply Latest reply: Aug 14, 2012 10:32 AM by anjhawar - oracle RSS

    createGroup AttributeError

    269975
      Hi ,

      We have OBIEE 11g installed on Linux servers. I am trying to automate the task to add groups to WL Server but I am getting the error - AttributeError: createGroup, when I issue the command atnr.createGroup('test group','test group')

      any help?

      Thanks
      nandoo
        • 1. Re: createGroup AttributeError
          anjhawar - oracle
          You can try the following sample script to create a group and user:



          connect('weblogic','weblogic1','t3://localhost:7001')

          print 'connected to Admin Server'

          serverConfig()

          print 'Lookup DefaultAuthenticator'

          password = 'weblogic1'

          cmoDefaultAuthenticator=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider('DefaultAuthenticator')

          print 'create group TestGroup'
          group = 'TestGroup'
          group_description = 'Test group'
          cmoDefaultAuthenticator.createGroup(group,group_description)

          users = ['testuser1','testuser2']
          for user in users:
          print 'create user: ',user
          cmoDefaultAuthenticator.createUser(user,password,user)
          cmoDefaultAuthenticator.addMemberToGroup(group,user)

          print 'if we want to add the above group to any of the default groups then for example: Operators. This is optional'

          cmoDefaultAuthenticator.addMemberToGroup('Operators',group)


          print 'created a new user and group..exiting..'

          disconnect()