PHP to server prompt

PHP to server prompt

am 29.03.2010 09:38:21 von Manolis Vlachakis

--000e0cd1eaf2e978860482eb98e3
Content-Type: text/plain; charset=ISO-8859-1

Hallo there everyone,
i am using a command on the server (kinit)and after that a password is
required to type in
the thing is that i would like that to be done automaticaly from the php
code!
i found that one
http://stackoverflow.com/questions/1...-prompt-in-php

but is not what i want(and is not working)

i thought something like
*
*


1. fwrite and then the$_SERVER['password here']


and then use the Post method to be writen on the prompt but i am not quite
sure whta to do ..

--
Manolis Vlachakis

Nelly's Family Hotel
Visit : www.nellys-hotel.gr
www.nellys.gr
Skype : manolis.vlachakis

--000e0cd1eaf2e978860482eb98e3--

Re: PHP to server prompt

am 29.03.2010 09:58:55 von Ashley Sheridan

--=-8aIiI3IZKKZ8UfOVEM+t
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mon, 2010-03-29 at 10:38 +0300, Manolis Vlachakis wrote:

> Hallo there everyone,
> i am using a command on the server (kinit)and after that a password is
> required to type in
> the thing is that i would like that to be done automaticaly from the php
> code!
> i found that one
> http://stackoverflow.com/questions/1...-prompt-in-php
>
> but is not what i want(and is not working)
>
> i thought something like
> *
> *
>
>
> 1. fwrite and then the$_SERVER['password here']
>
>
> and then use the Post method to be writen on the prompt but i am not quite
> sure whta to do ..
>

Most command line functions expect the password to be typed in over
stdin, which you can include in the call to the command line using a
pipe:

exec("echo 'password' | /usr/sbin/function function_args");

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-8aIiI3IZKKZ8UfOVEM+t--

Re: PHP to server prompt

am 29.03.2010 10:13:53 von Manolis Vlachakis

--0015174766acfef7b70482ec17ba
Content-Type: text/plain; charset=ISO-8859-1

Thanks a lot for your reply,
by mentioning
/usr/sbin/function function_args

you mean the file that runs and requires the password?
from what i had in mind i tried to use the args and argv attributes i used
in linux
but i couldn't make it !

Thanks again




On 29 March 2010 10:58, Ashley Sheridan wrote:

> On Mon, 2010-03-29 at 10:38 +0300, Manolis Vlachakis wrote:
>
>
> Hallo there everyone,
> i am using a command on the server (kinit)and after that a password is
> required to type in
> the thing is that i would like that to be done automaticaly from the php
> code!
> i found that one
> http://stackoverflow.com/questions/1...-prompt-in-php
>
> but is not what i want(and is not working)
>
> i thought something like
> *
> *
>
>
> 1. fwrite and then the$_SERVER['password here']
>
>
> and then use the Post method to be writen on the prompt but i am not quite
> sure whta to do ..
>
>
> Most command line functions expect the password to be typed in over stdin,
> which you can include in the call to the command line using a pipe:
>
> exec("echo 'password' | /usr/sbin/function function_args");
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>


--
Manolis Vlachakis

Nelly's Family Hotel
Visit : www.nellys-hotel.gr
www.nellys.gr
Skype : manolis.vlachakis

--0015174766acfef7b70482ec17ba--

Re: PHP to server prompt

am 29.03.2010 10:21:13 von Ashley Sheridan

--=-yLpMlQJTSmwQ73NLk0pX
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mon, 2010-03-29 at 11:13 +0300, Manolis Vlachakis wrote:

> Thanks a lot for your reply,
> by mentioning
> /usr/sbin/function function_args
>
> you mean the file that runs and requires the password?
> from what i had in mind i tried to use the args and argv attributes i used
> in linux
> but i couldn't make it !
>
> Thanks again
>
>
>
>
> On 29 March 2010 10:58, Ashley Sheridan wrote:
>
> > On Mon, 2010-03-29 at 10:38 +0300, Manolis Vlachakis wrote:
> >
> >
> > Hallo there everyone,
> > i am using a command on the server (kinit)and after that a password is
> > required to type in
> > the thing is that i would like that to be done automaticaly from the php
> > code!
> > i found that one
> > http://stackoverflow.com/questions/1...-prompt-in-php
> >
> > but is not what i want(and is not working)
> >
> > i thought something like
> > *
> > *
> >
> >
> > 1. fwrite and then the$_SERVER['password here']
> >
> >
> > and then use the Post method to be writen on the prompt but i am not quite
> > sure whta to do ..
> >
> >
> > Most command line functions expect the password to be typed in over stdin,
> > which you can include in the call to the command line using a pipe:
> >
> > exec("echo 'password' | /usr/sbin/function function_args");
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
>
>


Yeah, function would just be the util you're running with exec, which
I've found it's always better to give the absolute path to. I think you
can still pipe stuff across your way.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-yLpMlQJTSmwQ73NLk0pX--

Re: PHP to server prompt

am 29.03.2010 10:36:04 von Manolis Vlachakis

--001517447dba53f3da0482ec6728
Content-Type: text/plain; charset=ISO-8859-1

did it but it seems that is not working..
do you think because it requires the 'enter' to be given after the password
is required...




On 29 March 2010 11:21, Ashley Sheridan wrote:

> On Mon, 2010-03-29 at 11:13 +0300, Manolis Vlachakis wrote:
>
> Thanks a lot for your reply,
> by mentioning
> /usr/sbin/function function_args
>
> you mean the file that runs and requires the password?
> from what i had in mind i tried to use the args and argv attributes i used
> in linux
> but i couldn't make it !
>
> Thanks again
>
>
>
>
> On 29 March 2010 10:58, Ashley Sheridan wrote:
>
> > On Mon, 2010-03-29 at 10:38 +0300, Manolis Vlachakis wrote:
> >
> >
> > Hallo there everyone,
> > i am using a command on the server (kinit)and after that a password is
> > required to type in
> > the thing is that i would like that to be done automaticaly from the php
> > code!
> > i found that one
> > http://stackoverflow.com/questions/1...-prompt-in-php
> >
> > but is not what i want(and is not working)
> >
> > i thought something like
> > *
> > *
> >
> >
> > 1. fwrite and then the$_SERVER['password here']
> >
> >
> > and then use the Post method to be writen on the prompt but i am not quite
> > sure whta to do ..
> >
> >
> > Most command line functions expect the password to be typed in over stdin,
> > which you can include in the call to the command line using a pipe:
> >
> > exec("echo 'password' | /usr/sbin/function function_args");
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
>
>
>
>
> Yeah, function would just be the util you're running with exec, which I've
> found it's always better to give the absolute path to. I think you can still
> pipe stuff across your way.
>
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>


--
Manolis Vlachakis

Nelly's Family Hotel
Visit : www.nellys-hotel.gr
www.nellys.gr
Skype : manolis.vlachakis

--001517447dba53f3da0482ec6728--

Re: PHP to server prompt

am 29.03.2010 10:39:57 von Ashley Sheridan

--=-xf07FIh0gWxY9NJvXJVu
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mon, 2010-03-29 at 11:36 +0300, Manolis Vlachakis wrote:

> did it but it seems that is not working..
> do you think because it requires the 'enter' to be given after the password
> is required...
>
>
>
>
> On 29 March 2010 11:21, Ashley Sheridan wrote:
>
> > On Mon, 2010-03-29 at 11:13 +0300, Manolis Vlachakis wrote:
> >
> > Thanks a lot for your reply,
> > by mentioning
> > /usr/sbin/function function_args
> >
> > you mean the file that runs and requires the password?
> > from what i had in mind i tried to use the args and argv attributes i used
> > in linux
> > but i couldn't make it !
> >
> > Thanks again
> >
> >
> >
> >
> > On 29 March 2010 10:58, Ashley Sheridan wrote:
> >
> > > On Mon, 2010-03-29 at 10:38 +0300, Manolis Vlachakis wrote:
> > >
> > >
> > > Hallo there everyone,
> > > i am using a command on the server (kinit)and after that a password is
> > > required to type in
> > > the thing is that i would like that to be done automaticaly from the php
> > > code!
> > > i found that one
> > > http://stackoverflow.com/questions/1...-prompt-in-php
> > >
> > > but is not what i want(and is not working)
> > >
> > > i thought something like
> > > *
> > > *
> > >
> > >
> > > 1. fwrite and then the$_SERVER['password here']
> > >
> > >
> > > and then use the Post method to be writen on the prompt but i am not quite
> > > sure whta to do ..
> > >
> > >
> > > Most command line functions expect the password to be typed in over stdin,
> > > which you can include in the call to the command line using a pipe:
> > >
> > > exec("echo 'password' | /usr/sbin/function function_args");
> > >
> > > Thanks,
> > > Ash
> > > http://www.ashleysheridan.co.uk
> > >
> > >
> > >
> >
> >
> >
> >
> > Yeah, function would just be the util you're running with exec, which I've
> > found it's always better to give the absolute path to. I think you can still
> > pipe stuff across your way.
> >
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
>
>


No, it doesn't require an enter character to be sent. What code exactly
are you using?

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-xf07FIh0gWxY9NJvXJVu--