Hi,

I modified my server.xml as follows.

<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" digest="SHA1"/>

Also, downloaded "commons-logging-20051027.tar.gz" and untarred the same.

Later i tried giving below command :

$ java -classpath 
$CATALINA_HOME/server/lib/catalina.jar:/opt/commons-logging/commons-logging.jar 
org.apache.catalina.realm.RealmBase -a sha1 <manager>

But recd. following error :

ksh: syntax error: `newline or ;' unexpected

Please help doing this successfully.


Thanks,
Nehal

-----Original Message-----
From: Charlie C.L. King [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 26, 2005 1:28 PM
To: Tomcat Users List
Subject: Re: Securing Manager Role


Hi,
you can change it to a digested form, either in md5 or in sha1 or some
others(see java.security.MessageDigest). but sha1 should be safer. here's
the choir you have to do.

1. in your server.xml, add to its child element <Realm> a new attribute
named "digest" and with its value "SHA1"(whatever you want).

2. run this

% java -classpath $CATALINA_HOME/server/lib/catalina.jar:/path/to/commons-
logging.jar org.apache.catalina.realm.RealmBase -a sha1 <cleartext_password>

you'll get the digested passphrase

3. use the digested passphrase as password in you tomcat-user.xml

4. be sure to restart tomcat and then you can try it

the way digest means it should be difficult *BUT NOT IMPOSSIBLE* to decrypt
in case anyone might be able to read that file, thus you should secure the
user file and prevent others from reading it.

--
Regards, Charlie


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to