You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ole Ersoy <ol...@yahoo.com> on 2005/03/07 02:26:01 UTC
RealmBase Unix Script
Hey everybody,
I'm trying to get the following script to digest
a password for me using SHA:
#!/bin/sh
_CLASSPATH="$CATALINA_HOME"/server/lib/catalina.jar
_CLASSPATH="$_CLASSPATH":"$CATALINA_HOME"/common/lib/jmx.jar
_CLASSPATH="$_CLASSPATH":"$CATALINA_HOME"/bin/commons-logging-api.jar
java -classpath "$_CLASSPATH"
org.apache.catalina.realm.RealmBase -a SHA $1
However, when I run the script, I get this:
[root@workstation profile.d]# digest.sh secret
Usage: RealmBase -a <algorithm> [-e <encoding>]
<credentials>
It seems like it wants me to specify the encoding, but
the Tomcat documentation does not say what values to
put there, and it says you only need to do this when
using Non-ASCII values for the password.
Does anyone know how to fix this?
Thanks,
- Ole
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: RealmBase Unix Script
Posted by Mark Thomas <ma...@apache.org>.
The encoding parameter is optional.
If I use the digest.sh script on Fedora Core 3 all works as expected.
FWIW digest.bat also works on XP SP2.
I suggest using the pre-written scripts.
Mark
Ole Ersoy wrote:
> Hey everybody,
>
> I'm trying to get the following script to digest
> a password for me using SHA:
>
> #!/bin/sh
>
> _CLASSPATH="$CATALINA_HOME"/server/lib/catalina.jar
> _CLASSPATH="$_CLASSPATH":"$CATALINA_HOME"/common/lib/jmx.jar
> _CLASSPATH="$_CLASSPATH":"$CATALINA_HOME"/bin/commons-logging-api.jar
>
> java -classpath "$_CLASSPATH"
> org.apache.catalina.realm.RealmBase -a SHA $1
>
> However, when I run the script, I get this:
> [root@workstation profile.d]# digest.sh secret
> Usage: RealmBase -a <algorithm> [-e <encoding>]
> <credentials>
>
> It seems like it wants me to specify the encoding, but
> the Tomcat documentation does not say what values to
> put there, and it says you only need to do this when
> using Non-ASCII values for the password.
>
> Does anyone know how to fix this?
>
> Thanks,
> - Ole
>
>
>
>
>
>
> __________________________________
> Celebrate Yahoo!'s 10th Birthday!
> Yahoo! Netrospective: 100 Moments of the Web
> http://birthday.yahoo.com/netrospective/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org