Matthew Shalorne

Greenhorn
+ Follow
since Mar 23, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matthew Shalorne

I am running an app on a Linux box where I am already logged in. I want to spawn a process that needs to run as root. I have tried to use UnixLoginModule to login as root :

but my callback handler that would supply the password is never called and I don't appear to be logged in as root. It looks like UnixLoginModule simply returns data about the current user which is a fat lot of good. Does anyone know what I can do to make this thing do what it is supposed to do and allow me to perform a login? If JAAS is inadequate is there another way to acheive this?

Regards,
15 years ago
I am running an app on a Linux box where I am already logged in. I want to spawn a process that needs to run as root. I have tried to use UnixLoginModule to login as root :



but my callback handler that would supply the password is never called and I don't appear to be logged in as root. It looks like UnixLoginModule simply returns data about the current user which is a fat lot of good. Does anyone know what I can do to make this thing do what it is supposed to do and allow me to perform a login? If JAAS is inadequate is there another way to acheive this?

Regards,

Matthew
15 years ago
Thx Bhumika,
It makes no difference. Apart from the fact that the book (head first (to the errata page!)) does not specify a message - the toString of Throwable should be fine. I have tried several methods etc. nothing works. Does yours work? Has anyone got this to work? Is this a JBoss problem? Has anyone got it to work with JBoss?
Hi,

I have:

in my web.xml.
In errorPage.jsp I have:

I have inserted:

into one of my jsp pages. As expected it jumps to the error page but it only shows the exeption message next to 'old way:' (empty [ ] after Error is:. EL is working on my other jsp pages. Any ideas why ${pageContext.exception} doesn't work? Has nyone else got it to work?

My setup: jboss-4.0.0RC2 running on j2sdk1.4.2_06 running on Linux 2.6.11-1.14_FC3

Thx
Scott Stark, the Chief Technology Officer for JBoss, gave me a solution. If you use the default properties file names as demonstrated in the howto then you run the risk that someone else used the same names in their module to specify their users and they may be earlier in the path in which case the app will find that file and never read yours.
JBoss lets you specify and use a different users.properties file names in the login-config file. If you use unique names and put your properties files in the classes dir of your war it works fine.
Found a tag that I mis-spelt but I still have no joy because jboss doesn't seem to pick up my password file. The symptoms are that it now takes me to the login page (or login dialog when I use BASIC) but, although I have set up my users.properties etc as per the guide it always thinks my password is wrong! Two and a half days of zero productivity - grrrrr!
Thx Serghei - My form tags are right but it never gets to the form page - it doesn't try to. It just lets you go straight to the restricted servlet.
Hi,

I am using jboss-4.0.0RC2. I am trying to use form-based declarative security as described in Head First. My web.xml is:


My jboss-web.xml is:



I have added this to my login-config:


My user.properties has:


and my roles.properties has:


both files being in my classes dir in my war.
I am expecting the server to present me with my login form page when I try to access /sec/showlogs but instead it lets me access that servlet without any authentication. Does anyone know what I am doing wrong?

Thx,
Oops - my xml schema was still 2.3 in my web.xml! Have updated it to 2.4 and all is well.

Regards,
Hi,

I am trying to get EL working in JBoss. When I use an EL syntax expression it just prints it as is. What am I doing wrong? Is there something I need to do to activate it?

Regards,

Matthew
Hi All,
Any chance someone can answer my q in topic?
I include the key info for convenience:
I am currently needing to put together a one-to-one relationship and need to
understand the process if both beans need to have references to each other
as they are created. I am imagining it would go something like this (the
create method of one ejb takes enough params to create both, the create
method of the second takes a reference to the first and uses a combination
of create and postCreate to set up the persistent relationship):
bean 1 (name):
code:

(of course CreateExceptions etc ...)

Will this work? Is this the way to do it? Is there a better way?
Any thoughts?
Regards,
Matthew
SCJP, SCBCD
I'm intersted in this discussion. Hope I understand it. I am currently needing to put together a one-to-one relationship and need to understand the process if both beans need to have references to each other as they are created. I am imagining it would go something like this (create method of one ejb takes enough params to create both, the create method of the second takes a reference to the first and you uses a combination of create and post create to set up the persistent relationship):
bean 1 (name):

Will this work? Is this the way to do it? Is there a better way?
Any thoughts?
Regards,
Matthew