Tag Archives: wsadmin

Another new feature with IBM Connections 5.0 CR3

Within the fixlist of the new released CR3 of IBM Connections 5 there are several new configuration options mentioned. One of the interesting ones for me is the mobile update parameter AllowRemoveAccount. The default value is “false” and your Connections environment still works before, but what’s changed when you set this to true?

The official documentation is already uptodate and shows us:

When you set this option to true, accounts can be removed from a mobile device without requiring the user to login and without any authorization check. The user is asked to confirm the deletion of an account before it is removed.

So this helps me with my long list of Connections environments on my mobile clients. Until you set this to true you can only remove a profile, when you still can login to this system. I have several environments configured on my mobile which i can’t access anymore, because my user is disabled, or the system is only available within special wifi or network environments. So i’m not able to remove these accounts.

I will set this to true in all environments i have access to, to prevent this behavior.

Please beware of the additional infos in the online help:

If a user has existing accounts that they cannot access and that were created before this feature was available, those accounts cannot be deleted using the AllowRemoveAccount property.

Validation error

After checking out the mobile-config.xml (yes you should always use wsadmin to change config parameters), the parameter was not set in the file. So i added it and saved my change.

After checkIn i got a validation error, first i thought the order of parameters was wrong and so i checked the mobile-config.xsd. Even in the xsd the parameter wasn’t mentioned. So i checked <connections-root>/mobile/mobile/mobile/mobile-config/mobile-config.xsd|xml and there the parameter (and the other new ones) is available. I’m sure that the update was finished successfully without errors, so i checked two other systems (Windows and Linux) with CR3 and there was the same behavior, the new parameters were not copied to LotusConnections-config. After manually copying the xml and xsd i could set the values and after restarting of mobile the new feature was available.

When i enabled the feature the first time and i like the xml validation feature of checkIn and checkOut, so i used wsadmin to checkOut the mobile-config.xml

I haven’t checked if the new parameter useLeadingWildcardForGroupTypeahed with LotusConnections-config.xml works, but it isn’t available in the xsd too and i can’t found it in the complete connections-root directory. Will try the next days.

Command history wsadmin on Linux

Missing command history on Linux is a little problem when using command line utilities like wsadmin, db2, sqlplus and so on.

I found a solution for this today.

You can use rlwrap to get command history for all applications on the console and it is possible to recall and edit the commands. Rlwrap uses readline.

Installation on CentOS:

yum install readline-static gcc make
tar -xvzf rlwrap-0.41.tar.gz
cd rlwrap-0.41
./configure
make
make install

Call rlwrap with wsadmin:

rlwrap -r /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/wsadmin.sh -lang jython -username wasadmin -password password

rlwrap and db2

rlwrap -r db2

Use rlwrap everytime with alias

vim ~/.bash_profile
export WAS_HOME=/opt/IBM/WebSphere/AppServer
export DMGR=Dmgr01
alias db2='rlwrap -r db2'
alias wsadmin='cd $WAS_HOME/profiles/$DMGR/bin;rlwrap -r ./wsadmin.sh -lang jython'

SocCnx: more scripts added

Because of a delay of some hours on my flight back from Social Connections V on saturday, i had time to rewrite the jython script for backing up and restore security roles in WebSphere Application Server.

I updated the master branch on GitHub, which now contains a db2 initscript and the two new scripts securityrolebackup.py and securityrolerestore.py!

You can call the scripts through wsadmin.sh|bat and they do following.

securityrolebackup.sh

cd $WAS_HOME/profiles/Dmgr01/bin
./wsadmin.sh -lang jython -username admin -password password -f "path/securityrolebackup.sh" "../temp"

This will save the security roles for each installed application to $WAS_HOME/profiles/Dmgr01/temp to single files named: Application.txt.

securityrolerestore.sh

cd $WAS_HOME/profiles/Dmgr01/bin
./wsadmin.sh -lang jython -username admin -password password -f "path/securityrolerestore.sh" "../temp"

This will take the backups from $WAS_HOME/profiles/Dmgr01/temp and restore all access rights in the single applications. All applications will be restored, but you can change the script for one or some of the applications, when you change from line 49:

49 apps = AdminApp.list()
50 appsList = apps.split(lineSeparator)
51 # Test with some Apps:
52 # appsList = ['Blogs','Activities','Wikis']
53 # or Single App:
54 # appsList = ['Blogs']

Comment out line 49 and 50, and remove # from line 52 to restore only some Application security roles, or remove # from 54 to restore only one!

Tipp

I had several updates and cr installations with IBM Connections the last years and on some of these the updateinstaller removes my configured security roles. Now you can backup before and restore after installing a fix.

Disclaimer

These scripts are provided as is, with no warranties, and confers no rights! Please test them before using in production environments.

Klaus Bild – Add admin users to Connections 4 security roles – the easy way

Klaus Bild provided two scripts for setting Connections Admins through jython and wsadmin.

I want to add one detail, when you want to add multiple Admins, then you can use pipe | as delimiter.
First line would be
connwasadmin='wasadmin|conadmin'

Thanks Klaus, i like to set the admins through a script, because fixpack installations often set the j2ee roles to default.