Improving IDM Remote Loader Script

1 Likes
over 8 years ago
When we installed the Novell IDM Remote Loader on a Linux system, by default if you try to start it with the option to set passwords (-sp or -setpasswords), but already have assigned these values, the script apparently runs.

We have no errors or warnings, but the service does not start.

For example:

Start the RL without a password and you will be prompted to assign it.
# dirxml_jremote -config config8000.txt

RLP01

We can see that after setting the password files dpwd1f45 and lpwd1f45 are created ("Driver Password" and "Loader Password" I guess), these files store the passwords.

All right, now we know that we must launch the same command without passwords to start the service.

But, what happens if we launch the same command? Nothing, and that is normal, takes it as a password overwriting.

Obviously this is not a bug, this is expected behavior, but it would be helpful if we validate that the passwords are already set.

I made a small patch to do this:
# patch bin/x86_64/dirxml_jremote < dirxml_jremote.patch
# dirxml_jremote -config config8000.txt -sp passw0rd1 passw0rd2

And the two scenarios:

RLP02

I tested it with IDM 4.0.1 and SLES 11 SP3.

Author: William Vera - wvera@novell.com
Description: Add a simple validation if the password has been set.
--- dirxml_jremote.orig 2013-08-26 18:55:04.000000000 -0500
dirxml_jremote 2013-08-27 19:55:23.000000000 -0500
@@ -2,6 2,8 @@
###############################################################################
# Shell script for running DirXML Java Remote Loader
# Copyright (C) 2003, Novell Inc.
# 2013-08-27 - Modified by William Vera
# - Add a simple validation if the password has been set.
###############################################################################

###############################################################################
@@ -58,7 60,26 @@

# echo $CLASSPATH

# 2013-08-27 - wvera@novell.com
if [ -z "$RDXML_PATH" ];then
RDXML_PATH="/opt/novell/dirxml"
fi
if ls $RDXML_PATH | grep -Eq "lpwd1f45|dpwd1f45" && echo $* | grep -Eq "\-sp|\-setpasswords" ; then
while [ -z $ANSWER ]
do
read -p "It seems that you have assigned a password, you want to overwrite it?: [y/n] " ANSWER
done
case $ANSWER in
"y")
rm $RDXML_PATH/lpwd*
rm $RDXML_PATH/dpwd*;;
"n")
echo "Leaving..."
echo "Remember to launch the Remote Loader without \"-sp\" or \"-setpassords\" options to start the service.";;
*) echo "Please type \"y\" or \"n\"";;
esac
fi
# End
echo Starting java...
java -classpath $CLASSPATH com.novell.nds.dirxml.remote.loader.RemoteLoader $*
fi
-

It's very useful to me in this way, I hope some of you too.

Labels:

How To-Best Practice
Collateral
Comment List
Anonymous
Related Discussions
Recommended