Results 1 to 5 of 5
Hi all. Having a little issue with creating a login message banner in RHEL6 that uses two buttons. One for Accept which logs the user in. The second for Cancel ...
- 01-25-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 12
RHEL6 Login banner with cancel button not working
Hi all. Having a little issue with creating a login message banner in RHEL6 that uses two buttons. One for Accept which logs the user in. The second for Cancel which immediately logs the user out. I've modified the /etc/gdm/PostLogin/Default file to have the script, posted below, and it worked perfectly fine in RHEL5. But in 6, when you click Cancel, the user is still able to log in. It even states in the system logs that the user cancelled the login. Here's the script:
/usr/bin/xmessage -center -buttons "Accept":2," Cancel ":3 -file /etc/issue1 -nearmouse
egxit="$?"
if [ $egxit != 2 ]
then
# Immediately force logout by killing 'X' session processkill -9 `env | grep SESSION_MANAGER | tr -s ' ' | cut -d'/' -f9`fi
As you can see, I have the script using the 9th field of the user's env to get the PID, and using the kill command to end the process, which should be logging the user out right away if they click the Cancel button. This works in 5 without issue (though I used -f5 in RHEL5, had to move it to -f9 for RHEL6).
Anyone have any ideas?Last edited by xion824; 01-25-2011 at 06:20 PM. Reason: Clarification on what happens in RHEL6
- 02-11-2011 #2Just Joined!
- Join Date
- Jan 2011
- Posts
- 12
/bump
Can anyone help out on this one? Still not able to get this to work. I get the xmessage box to show up, and both buttons are clickable. Though selecting either Accept or Cancel both allows the account to login. I need Cancel to immediately log that user account back out.
I know the kill command line works. If you run that one line manually, it logs the account out right away.
I feel like I'm in a hole, with this issue up top yelling at me to put the lotion on my skin, or else I get the hose again!
- 02-12-2011 #3Just Joined!
- Join Date
- Jan 2011
- Posts
- 12
scrapped this plan
- 02-15-2011 #4Just Joined!
- Join Date
- Jan 2011
- Posts
- 12
How do I close a thread?
- 02-17-2011 #5Just Joined!
- Join Date
- Jan 2011
- Posts
- 12
/bump
Anyone?


Reply With Quote