IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 2 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New weird browser behavior
redhat linux bash script
#!/bin/bash
# the following line tells the browser what type of content we are sending
echo "Content-type: text/html"
# set up the title and indexing information for the page
echo ""
echo '<html>'
echo '<head>'
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'
echo '<title>chinese food eat here</title>'
echo '</head>'
echo '<body>'
echo '
'
#
echo "/usr/bin/ssh -tt machine1 sudo -u foo ps -ef | grep stuff
"
# below line needs a -tt to get the sudo to work
/usr/bin/ssh -tt machine1 sudo -u foo ps -ef | grep stuff 2>&1
echo "/usr/bin/ssh tx-app01 sudo -u msft_webapp ps -ef | grep bulksettlement 2>&1
"
# the below line has an older sudo does not need -tt
/usr/bin/ssh machine2 sudo -u foo ps -ef | grep more stuff 2>&1
echo '</body>'
echo '</html>'
exit 0

chmod 775 script.cgi

run it from the command line returns the value from a ps -ef for both machines

hit it over apache2.2 only the second ps -ef returns any content

machine that bash lives on 2.6.32.29-0.3-default 64bit suse
machine1 2.6.32-220.17.1.el6.x86_64 redhat
machine2 2.6.16.60-0.39.3-smp suse

any ideas? same behavior in chrome firefox and exploder
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New checked apache logs, nothing there
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New machine1 not happy with the Apache user's ssh keys?
If you haven't already tried, su a shell to the Apache user's account, then try the failing ssh command with an added -v (or two, three)
New ssh is not failing at command line
same user is running apache and owns and runs the script.
Got an exact duplicate of redhat vm and it works there, it seems that standard out is acting funny
if I create a variable in the script called
FOO="machine1 ps -ef | grep stuff"
ssh -tt $FOO
it displays in the browser, fekkin annoying
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New Re: ssh is not failing at command line
Make sure you set a TERM environment variable in the script or crontab.

Otherwise it'll balk.
--
greg@gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
New will try that monday
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New didnt work
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New DIDJA try a couple different ones...
that were valid for the system?
--
greg@gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
New xterm. vt100. wy60,
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New Okies..m I'm out.
I have another shell script on a really really old machine (1998) that won't run from cron...

I've never been able to fix it to run from cron period. Its MUCH along the same lines yours looks.
--
greg@gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
New If you have control over machine1
Turn up logging on sshd (or run it in debug mode)? That at least cuts Apache's handling of any ssh client error output out of the loop.
New ssh -vv
gives me great detail on the terminal, gives me nothing on the browser, Faking it with variables works but its still annoys me
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
New I meant the other end
i.e. turn up logging on the target of the ssh connection if you can.
New Could try that, thanks
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free American and do not reflect the opinions of any person or company that I have had professional relations with in the past 57 years. meep
     weird browser behavior - (boxley) - (13)
         checked apache logs, nothing there -NT - (boxley)
         machine1 not happy with the Apache user's ssh keys? - (scoenye) - (7)
             ssh is not failing at command line - (boxley) - (6)
                 Re: ssh is not failing at command line - (folkert) - (5)
                     will try that monday -NT - (boxley)
                     didnt work -NT - (boxley) - (3)
                         DIDJA try a couple different ones... - (folkert) - (2)
                             xterm. vt100. wy60, -NT - (boxley) - (1)
                                 Okies..m I'm out. - (folkert)
         If you have control over machine1 - (scoenye) - (3)
             ssh -vv - (boxley) - (2)
                 I meant the other end - (scoenye) - (1)
                     Could try that, thanks -NT - (boxley)

Friends, the idle brain is the devil's playground!
110 ms