Showing posts with label Weblogic. Show all posts
Showing posts with label Weblogic. Show all posts

Wednesday, 13 November 2013

External LDAP user for Weblogic Administration

Wednesday, 2 October 2013

WLST snippets to Add Remove users in Weblogic

Put below code is .py script.
User-group.txt and RemoveUsers.txt has lines like
user email/Description group
user1 user1@gmail.com Area_manager

To Add Users with Groups:

for line in open("D:\data\ImportUser\user-groups.txt"):
    line = line.strip()
    if len(line) != 0:   
       it=line.split(',')
       print 'Add User ========== user:', it[0], ' desc:', it[1], ' group:', it[2]     
       if atnr.userExists(it[0]) == 0:
          print '   create user:', it[0]
          atnr.createUser(it[0],password,it[1])
       if atnr.isMember(it[2],it[0],true) == 0:
          print '   add group :', it[2], 'for user', it[0]  
          atnr.addMemberToGroup(it[2],it[0]) 
       else:
            print '   User :', it[0], 'is already member of group', it[2] 


To Remove Users:

for line in open("D:\data\RemoveUsers\RemoveUsers.txt"):
    line = line.strip()
    if len(line) != 0:
       it=line.split(',')
       print 'Remove Group ========== user:', it[0], 'group', it[2]     
       if atnr.isMember(it[2],it[0],true) != 0:
          print '   remove group :', it[2], 'for user', it[0]
          atnr.removeMemberFromGroup(it[2], it[0])
       else:
          print '   User :', it[0], 'is not member of group', it[2]


Similar Other functions are:

atnr.createGroup(group,groupcomment)
atnr.createUser(user,password,user)

Thursday, 11 October 2012

Weblogic picking/registering incorrect time in the logs and Application

Weblogic Applications registering incorrect timestamp, (ie HFM reports produced showing incorrect timestamp or weblogic logs will records incorect time or IBM TRIRIGA Application) . The issue is primarily of the Java picking incorrect time at the time weblogic startup. So any appliation hosted on weblogic will get incorrect timestamp. In our case Weblogic was picking up GMT +1 instead of GMT+2

What we found was that the registry setting  was missing a value in the key StandardName under the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation.


When you change the timezone from the clock and then change it back to it’s original value (here it is UTC +1:00 Amsterdam).  Then what we see is the above StandardName value is populated in the registry key.



This resolved our issue with incorrect timestamp for various application using Weblogic as the application server.