|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: php3 Digest 12 May 2000 03:54:57 -0000 Issue 1665
From: php3-digest-help
lists.php.netDate: Thu May 11 2000 - 22:54:57 CDT
- Next message: php3-digest-help
lists.php.net: "php3 Digest 12 May 2000 15:54:53 -0000 Issue 1666"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 11 May 2000 15:54:57 -0000 Issue 1664"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php3 Digest 12 May 2000 03:54:57 -0000 Issue 1665
Topics (messages 89982 through 90089):
Newbie question
89982 by: "Robert V. Zwink" <rzwink
microcenter.com>
almost... zeus with php4RC2
89983 by: Dave Goodrich <daveg
rblc.com>
php and ssh ?
89984 by: "Mike Alexander Sauvain" <msauvain
EDV-Support.ch>
89987 by: "Jason" <jasonc
webpipe.net>
90000 by: "Mike Alexander Sauvain" <msauvain
EDV-Support.ch>
90001 by: "Mike Alexander Sauvain" <msauvain
EDV-Support.ch>
Auto-Linking Marked-Up Text
89985 by: "Waldo L. Jaquith" <waldo
waldo.net>
Zeus with php4RC2 = success
89986 by: Dave Goodrich <daveg
rblc.com>
PHP on FreeBSD?
89988 by: Kim Shrier <kim
tinker.com>
php4RC2 question about the empty() function
89989 by: "Brandt Everett" <everett
bentonrea.com>
90053 by: richard
zend.com (Richard Lynch)
Does PHP + CCVS work?
89990 by: Paul Meagher <php
datavore.com>
Newbie Help
89991 by: Robert Hough <rch
qserve.net>
90002 by: richard
zend.com (Richard Lynch)
get_browser function
89992 by: Bug Hunter <bughuntr
one.ctelcom.net>
90009 by: richard
zend.com (Richard Lynch)
90015 by: Rob Hardowa <rob
lionofzion.com>
SMall bit of graphics help
89993 by: "Wizaerd" <wizaerd
wizaerd.com>
90021 by: Gregor Welters <gregor
welters.de>
90026 by: "Jason" <jasonc
webpipe.net>
90052 by: richard
zend.com (Richard Lynch)
A thanks and question
89994 by: Jeremy Gibson <jmgibson1
home.com>
phpMyAdmin problems
89995 by: Michael Holm <michael.holm
webjones.com>
now reading a file in a loop, but going past EOF !
89996 by: "Ted Knudson" <tedk
cyberlink.com>
90039 by: richard
zend.com (Richard Lynch)
90054 by: richard
zend.com (Richard Lynch)
90058 by: Francis Smit <francis
kbd.com.au>
Fw: [PHP3] php4RC2 question about the empty() function
89997 by: "Jerry" <php_list
lucard.to>
89999 by: "Brandt Everett" <everett
bentonrea.com>
90046 by: Lars Torben Wilson <torben
pinc.com>
Timeout for fgets?
89998 by: Andrei Zmievski <andrei
ispi.net>
90032 by: richard
zend.com (Richard Lynch)
90034 by: Andrei Zmievski <andrei
ispi.net>
can't find php.ini
90003 by: "darcy w. christ" <darcy
elegant.com>
splitting strings
90004 by: richard
zend.com (Richard Lynch)
90017 by: Gregor Welters <gregor
welters.de>
90023 by: eschmid+sic
s.netic.de
90040 by: Gregor Welters <gregor
welters.de>
90044 by: eschmid+sic
s.netic.de
90050 by: Gregor Welters <gregor
welters.de>
90060 by: Paul DuBois <paul
snake.net>
Instalando o webmail IMP - SOCORRRO
90005 by: "Jackson Ricardo Schroeder" <jackson
pwr.com.br>
90008 by: Vidyut Luther <vluther
gotslack.com>
(OT) Source control?
90006 by: richard
zend.com (Richard Lynch)
Refreshing in a new frame?
90007 by: richard
zend.com (Richard Lynch)
90016 by: Gregor Welters <gregor
welters.de>
php3_asp_tags
90010 by: shh
ricochet.net
90038 by: Matt McClanahan <cardinal
dodds.net>
Slide show program problem
90011 by: richard
zend.com (Richard Lynch)
Shuffle
90012 by: richard
zend.com (Richard Lynch)
how to use sizeof() with trwo-dimensional array
90013 by: Gregor Welters <gregor
welters.de>
PHP3 Extensions
90014 by: "Thomas E. Ruth" <truth
ichaos.com>
security for admin pages....
90018 by: richard
zend.com (Richard Lynch)
SUM in query
90019 by: richard
zend.com (Richard Lynch)
Array transfomation
90020 by: Gregor Welters <gregor
welters.de>
problem with php3.0.16 with apache 1.3.12-2
90022 by: richard
zend.com (Richard Lynch)
gpc_globals
90024 by: richard
zend.com (Richard Lynch)
It is possible to pass methods to session_set_save_handler()?
90025 by: richard
zend.com (Richard Lynch)
Using a while loop to read in a line of text
90027 by: richard
zend.com (Richard Lynch)
90083 by: Samuel Leibowitz <sleibowi
dilithium.btcwcu.org>
Zoom Image Effect in Php and Python
90028 by: richard
zend.com (Richard Lynch)
Frames and PHP
90029 by: richard
zend.com (Richard Lynch)
90041 by: "Paul Burney" <burney
gseis.ucla.edu>
Lotus Notes
90030 by: richard
zend.com (Richard Lynch)
date functions (sql related)
90031 by: Dieter Kneffel <data
wap4.com>
zend optimizer
90033 by: "Morgan Harvey" <morgan
anomalyinc.com>
90047 by: "Jason" <jasonc
webpipe.net>
90048 by: "Tyler Longren" <tyler.longren
midiowa.net>
90057 by: "Morgan Harvey" <morgan
anomalyinc.com>
90059 by: "Jason" <jasonc
webpipe.net>
90061 by: "Morgan Harvey" <morgan
anomalyinc.com>
Showing raw img data ?
90035 by: richard
zend.com (Richard Lynch)
Changes for Migrating to PHP4
90036 by: richard
zend.com (Richard Lynch)
90063 by: "Andrew Smith" <lists
cadre.com.au>
PHP code OR MySQL Table Join ???
90037 by: Rob Hardowa <rob
lionofzion.com>
90051 by: richard
zend.com (Richard Lynch)
90078 by: Rob Hardowa <rob
lionofzion.com>
How to send a POST request to a php script (without a form submit)
90042 by: richard
zend.com (Richard Lynch)
Fw: How to send a POST request to a php script (without a form submit)
90043 by: richard
zend.com (Richard Lynch)
odbc_fetch_row - always getting the same row
90045 by: richard
zend.com (Richard Lynch)
PHP-Authorisation under NT
90049 by: richard
zend.com (Richard Lynch)
90064 by: "Andrew Smith" <lists
cadre.com.au>
Member login
90055 by: Bernie Huang <bernie.huang
ec.gc.ca>
JavaScript script value inside PHP code
90056 by: Francis Smit <francis
kbd.com.au>
90062 by: Francis Smit <francis
kbd.com.au>
randomizing select queries
90065 by: Bill Zeller <billzeller
yahoo.com>
90068 by: Nathan Wallace <nathan
synop.com>
Trapping Invalid MySQL Result ID's in fetch_array
90066 by: Daniel Convissor <danielc
analysisandsolutions.com>
90067 by: "Jason Brooke" <jason
qgl.org>
90071 by: Daniel Convissor <danielc
analysisandsolutions.com>
90075 by: Rob Hardowa <rob
lionofzion.com>
the php performance using a lot of "include"
90069 by: liwei <liwei
sepaeic.gov.cn>
90086 by: Ron Chmara <ron
Opus1.COM>
How I could use value in mysql variable??
90070 by: yongrae
itventure.co.kr
90082 by: Daniel Convissor <danielc
analysisandsolutions.com>
Regex Challenge
90072 by: "SANIsoft" <tarique
nagpur.dot.net.in>
Get mime type?
90073 by: "Josh McDonald" <josh
isa.net.au>
90074 by: Brent Sims <brent
webokay.com>
90085 by: "Andrew Smith" <lists
cadre.com.au>
File download (almost got it)
90076 by: "Josh McDonald" <josh
isa.net.au>
90087 by: "Andrew Smith" <lists
cadre.com.au>
I want to change the links in the left when the "content" is changed in PHP
90077 by: liwei <liwei
sepaeic.gov.cn>
randomizing select queries PLEASE READ
90079 by: Bill Zeller <billzeller
yahoo.com>
90080 by: Bill Zeller <billzeller
yahoo.com>
randomizing select queries PLEASE HELP!!!
90081 by: Nathan Wallace <nathan
synop.com>
Gnutella search
90084 by: okan
cyberserver.org
PHP - How to Create Dyanamic URL's
90088 by: "Saji D" <saji
hcl.co.in>
90089 by: "Jay Thomas" <jay
ranchoweb.com>
Administrivia:
To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php3-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php3
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On page 469 of WROX Professional PHP programming, they have an example
very similar to what you want to do. They have the two lines switched
around though.
header("Location: $page");
setcookie("testcookie", "1");
Try switching them, and see if that works.
Hopefully helpful, helping the hopeful,
Robert Zwink
http://zwink.levitate.org
"Eugene V. Goldberg" wrote:
>
> Here is the code:
>
> setcookie("user_id", $row->user_id);
> Header("Location:page2.htm");
>
> This code does not work, the cookie is not set when testing in page2.
>
> I am using PHP3, Personal Web Server4, IE5. Cookie is enabled.
>
> Thank you for cooperation.
>
> Regards,
> Eugene.
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
PHP-4RC2 and Zend 3.3.6 on FreeBSD v3.2 just compiled and installed for me
with;
./configure \
--with-zeus=/usr/local/zeus \
--with-iodbc
I followed the instructions at;
http://support.zeus.com/faq/entries/php4.html
The configure instructions were critical.
DAve.
attached mail follows:
sosorry, but if i do follow:
exec("./ssu -u root -p mypass -c 'ls'");
i recive that in my log:
Must be run as root or be setuid root
how i can solve it ?
----- Original Message -----
From: Jason <jasonc
webpipe.net>
To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
Sent: Thursday, May 11, 2000 7:02 PM
Subject: RE: [PHP3] php and ssh ?
> I don't think the second would work because you're authenticated to
the
> local server not a remote one. You would have to establish a
connection to
> the remote server first.
>
> jason
>
> > -----Original Message-----
> > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > Sent: Thursday, May 11, 2000 7:57 AM
> > To: Jason Cox
> > Cc: php3
lists.php.net
> > Subject: Re: [PHP3] php and ssh ?
> >
> >
> > ./ssu -u root -p sfsfs -c 'mkdir /data && ls' <-- works
> >
> > ./ssu -u root -p sfsfs -c '/usr/bin/ssh myserver ls && ls --help &&
> > /bin/mkdir /test/safhj'
> > dosent work: the first command is on the remote server,
> > the second command is one the local server
> >
> >
> > ----- Original Message -----
> > From: Jason Cox <jasonc
webpipe.net>
> > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > Sent: Thursday, May 11, 2000 7:54 AM
> > Subject: RE: [PHP3] php and ssh ?
> >
> >
> > > Like this:
> > > ./ssu -u root -p sfsfs -c 'mkdir /data'
> > > ./ssu -u root -p sfsfs -c 'reboot'
> > >
> > > You can only use one command at a time
> > >
> > > I definitely wouldn't run this as root though. That means that
the
> > password
> > > would be somewhere where it could be had.
> > >
> > > jason
> > >
> > > -----Original Message-----
> > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > To: jasonc
webpipe.net
> > > Subject: Re: [PHP3] php and ssh ?
> > >
> > >
> > > im sorry, big question, how i can use space's ? like:
> > > ./ssu -u root -p sfsfs -c mkdir /data && reboot ??
> > >
> > > thanks again.......... mike
> > >
> > > ----- Original Message -----
> > > From: Jason <jasonc
webpipe.net>
> > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > Sent: Wednesday, May 10, 2000 6:49 PM
> > > Subject: RE: [PHP3] php and ssh ?
> > >
> > >
> > > > Mike,
> > > >
> > > > Here you go...
> > > > It's released under the GPL. Please let me know if you make any
> > > changes.
> > > >
> > > > jason
> > > >
> > > > > -----Original Message-----
> > > > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > To: Jason Cox
> > > > > Cc: php3
lists.php.net
> > > > > Subject: Re: [PHP3] php and ssh ?
> > > > >
> > > > >
> > > > > so this script could be interesting me principal, fact its
> > > combinable
> > > > > with a ssh command?
> > > > > hmm, please let me look in, it could be a part of my problem
> > > resolution.
> > > > >
> > > > > thanks again... mike a. sauvain....
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Jason Cox <jasonc
webpipe.net>
> > > > > To: <php3
lists.php.net>
> > > > > Sent: Wednesday, May 10, 2000 4:07 AM
> > > > > Subject: RE: [PHP3] php and ssh ?
> > > > >
> > > > >
> > > > > > I have a script called super 'su' that allows you to login,
> > > execute a
> > > > > > command, and exit all in one command. This could be used
via
> > the
> > > > > system()
> > > > > > function. It uses PAM and if used with a database, could
allow
> > > users
> > > > > to
> > > > > > authenticate against it and run certain commands such as
'chmod'
> > > > > without
> > > > > > making the system vulnerable. The syntax of the thing goes
like
> > > this
> > > > > > "ssu -u [username] -p [passwork] -f '[commands]'". Let me
know
> > if
> > > you
> > > > > want
> > > > > > more info.
> > > > > >
> > > > > > Jason
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mike Alexander Sauvain
[mailto:msauvain
EDV-Support.ch]
> > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > To: Nathan Benson
> > > > > > Cc: php3
lists.php.net
> > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > >
> > > > > >
> > > > > > re: 2001, so fact:
> > > > > > 1. make some directorys on diferent locations (servers),
that
> > > works,
> > > > > > like
> > > > > > mkdir ("/data/$si", 0700); // or // exec("md
/data/$si");
> > > > > > 2. chown, should run on dif. loc., example DONT work because
the
> > > > > apache
> > > > > > runs
> > > > > > under nobody so it has no super user rights to do that
> > > > > > passthru("chown 500 -R /data/mail/$si && chgrp
500 -R
> > > > > > /data/mail/$si"); // or
> > > > > > exec()
> > > > > > system()
> > > > > > 3. maybe other commands directly fetched from php /
webinterface
> > /
> > > > > mysql
> > > > > > place
> > > > > >
> > > > > > fact of problem / quests
> > > > > > its possible to use a php script, that logs in the other
server
> > an
> > > > > > executes some commands.
> > > > > > the problem one these line, is that it doesent execute /
enter
> > the
> > > > > > password, so it is posible to emulate
> > > > > > the enter button ?, that i think could be the first possible
> > nice
> > > > > > solution for me.
> > > > > > exec("ssh -l root localhost ?? mypass or $VAR ?? \n ?? &&
chown
> > > > > $uid -R
> > > > > > /data/$si");
> > > > > >
> > > > > > so if that isnt possible other ask: if i work now with
> > > ssh-agent,RSA,
> > > > > > other users can hack
> > > > > > the connection (with a php script), because i have already
an
> > > > > configured
> > > > > > autologin daemon
> > > > > > and he use the same line ? like:
> > > > > > exec("ssh -l root localhost --comand grep /etc/passwd >
> > > > > > sendmailXxXxx.........");
> > > > > >
> > > > > > or are the last only realy reasonable resolution that i
output
> > > the -
> > > > > php
> > > > > > / webinterface / mysql - data
> > > > > > to a file, that after i let to execute with a cronjob
? );-(/)
> > > > > >
> > > > > > thanks again mike....
> > > > > > ----- Original Message -----
> > > > > > From: Nathan Benson <phuzz
phactor.org>
> > > > > > To: Mike Alexander Sauvain <msauvain
edv-support.ch>
> > > > > > Cc: <php3
lists.php.net>
> > > > > > Sent: Wednesday, May 10, 2000 12:23 AM
> > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > >
> > > > > >
> > > > > > > php doesn't have native ssh functions (that I know of),
but
> > > maybe
> > > > > > > you could use exec() etc, with the ssh binaries along with
RSA
> > > keys
> > > > > > > and ssh-agent to do what you were wanting? seeing as how
your
> > > > > message
> > > > > > > wasn't very descriptive of what you were trying to
accomplish
> > i
> > > can
> > > > > > > only speculate. hope this is of some help.
> > > > > > >
> > > > > > > > can this work, to php let use ssh connections ?
> > > > > > > >
> > > > > > > > and where i find some related stuff about ?
> > > > > > >
> > > > > > > --
> > > > > > > Nathan Benson
> > > > > > > -------------
> > > > > > > http://www.phactor.org/
> > > > > > >
> > > > > > > Me spell chuker work grate. Need grandma chicken.
> > > > > > >
> > > > > > > --
> > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > To unsubscribe, send an empty message to
> > > > > > php3-unsubscribe
lists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > To search the mailing list archive, go to:
> > > > > > http://www.php.net/mailsearch.php3
> > > > > > > To contact the list administrators, e-mail:
> > > > > > php-list-admin
lists.php.net
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > To unsubscribe, send an empty message to
> > > > > php3-unsubscribe
lists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > > php3-digest-subscribe
lists.php.net
> > > > > > To search the mailing list archive, go to:
> > > > > > http://www.php.net/mailsearch.php3
> > > > > > To contact the list administrators, e-mail:
> > > > > php-list-admin
lists.php.net
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________________
> > > > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > > > >
> > > > > > --
> > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > To unsubscribe, send an empty message to
> > > > > php3-unsubscribe
lists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > > php3-digest-subscribe
lists.php.net
> > > > > > To search the mailing list archive, go to:
> > > > > http://www.php.net/mailsearch.php3
> > > > > > To contact the list administrators, e-mail:
> > > > > php-list-admin
lists.php.net
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > To unsubscribe, send an empty message to
> > > php3-unsubscribe
lists.php.net
> > > > > To subscribe to the digest, e-mail:
> > > php3-digest-subscribe
lists.php.net
> > > > > To search the mailing list archive, go to:
> > > > http://www.php.net/mailsearch.php3
> > > > To contact the list administrators, e-mail:
> > > php-list-admin
lists.php.net
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > _______________________________________________________
> > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > >
> >
> >
> >
> > --
> > PHP 3 Mailing List <http://www.php.net/>
> > To unsubscribe, send an empty message to
php3-unsubscribe
lists.php.net
> > To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
> > To search the mailing list archive, go to:
> > http://www.php.net/mailsearch.php3
> > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> >
> >
> >
>
>
> _______________________________________________________
> Site Design, Hosting, and E-Commerce at www.webpipe.net
>
attached mail follows:
Then setuid to root like this 'chmod 4711 /path/to/ssu'. You also need to
make sure there is an entry in /etc/pam.d for ssu. You can just copy the
one for su.
jason
> -----Original Message-----
> From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> Sent: Thursday, May 11, 2000 11:26 AM
> To: jasonc
webpipe.net
> Cc: php3
lists.php.net
> Subject: Re: [PHP3] php and ssh ?
>
>
> sosorry, but if i do follow:
> exec("./ssu -u root -p mypass -c 'ls'");
> i recive that in my log:
> Must be run as root or be setuid root
>
> how i can solve it ?
>
> ----- Original Message -----
> From: Jason <jasonc
webpipe.net>
> To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> Sent: Thursday, May 11, 2000 7:02 PM
> Subject: RE: [PHP3] php and ssh ?
>
>
> > I don't think the second would work because you're authenticated to
> the
> > local server not a remote one. You would have to establish a
> connection to
> > the remote server first.
> >
> > jason
> >
> > > -----Original Message-----
> > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > Sent: Thursday, May 11, 2000 7:57 AM
> > > To: Jason Cox
> > > Cc: php3
lists.php.net
> > > Subject: Re: [PHP3] php and ssh ?
> > >
> > >
> > > ./ssu -u root -p sfsfs -c 'mkdir /data && ls' <-- works
> > >
> > > ./ssu -u root -p sfsfs -c '/usr/bin/ssh myserver ls && ls --help &&
> > > /bin/mkdir /test/safhj'
> > > dosent work: the first command is on the remote server,
> > > the second command is one the local server
> > >
> > >
> > > ----- Original Message -----
> > > From: Jason Cox <jasonc
webpipe.net>
> > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > Sent: Thursday, May 11, 2000 7:54 AM
> > > Subject: RE: [PHP3] php and ssh ?
> > >
> > >
> > > > Like this:
> > > > ./ssu -u root -p sfsfs -c 'mkdir /data'
> > > > ./ssu -u root -p sfsfs -c 'reboot'
> > > >
> > > > You can only use one command at a time
> > > >
> > > > I definitely wouldn't run this as root though. That means that
> the
> > > password
> > > > would be somewhere where it could be had.
> > > >
> > > > jason
> > > >
> > > > -----Original Message-----
> > > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > > To: jasonc
webpipe.net
> > > > Subject: Re: [PHP3] php and ssh ?
> > > >
> > > >
> > > > im sorry, big question, how i can use space's ? like:
> > > > ./ssu -u root -p sfsfs -c mkdir /data && reboot ??
> > > >
> > > > thanks again.......... mike
> > > >
> > > > ----- Original Message -----
> > > > From: Jason <jasonc
webpipe.net>
> > > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > > Sent: Wednesday, May 10, 2000 6:49 PM
> > > > Subject: RE: [PHP3] php and ssh ?
> > > >
> > > >
> > > > > Mike,
> > > > >
> > > > > Here you go...
> > > > > It's released under the GPL. Please let me know if you make any
> > > > changes.
> > > > >
> > > > > jason
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > > To: Jason Cox
> > > > > > Cc: php3
lists.php.net
> > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > >
> > > > > >
> > > > > > so this script could be interesting me principal, fact its
> > > > combinable
> > > > > > with a ssh command?
> > > > > > hmm, please let me look in, it could be a part of my problem
> > > > resolution.
> > > > > >
> > > > > > thanks again... mike a. sauvain....
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: Jason Cox <jasonc
webpipe.net>
> > > > > > To: <php3
lists.php.net>
> > > > > > Sent: Wednesday, May 10, 2000 4:07 AM
> > > > > > Subject: RE: [PHP3] php and ssh ?
> > > > > >
> > > > > >
> > > > > > > I have a script called super 'su' that allows you to login,
> > > > execute a
> > > > > > > command, and exit all in one command. This could be used
> via
> > > the
> > > > > > system()
> > > > > > > function. It uses PAM and if used with a database, could
> allow
> > > > users
> > > > > > to
> > > > > > > authenticate against it and run certain commands such as
> 'chmod'
> > > > > > without
> > > > > > > making the system vulnerable. The syntax of the thing goes
> like
> > > > this
> > > > > > > "ssu -u [username] -p [passwork] -f '[commands]'". Let me
> know
> > > if
> > > > you
> > > > > > want
> > > > > > > more info.
> > > > > > >
> > > > > > > Jason
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Mike Alexander Sauvain
> [mailto:msauvain
EDV-Support.ch]
> > > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > > To: Nathan Benson
> > > > > > > Cc: php3
lists.php.net
> > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > >
> > > > > > >
> > > > > > > re: 2001, so fact:
> > > > > > > 1. make some directorys on diferent locations (servers),
> that
> > > > works,
> > > > > > > like
> > > > > > > mkdir ("/data/$si", 0700); // or // exec("md
> /data/$si");
> > > > > > > 2. chown, should run on dif. loc., example DONT work because
> the
> > > > > > apache
> > > > > > > runs
> > > > > > > under nobody so it has no super user rights to do that
> > > > > > > passthru("chown 500 -R /data/mail/$si && chgrp
> 500 -R
> > > > > > > /data/mail/$si"); // or
> > > > > > > exec()
> > > > > > > system()
> > > > > > > 3. maybe other commands directly fetched from php /
> webinterface
> > > /
> > > > > > mysql
> > > > > > > place
> > > > > > >
> > > > > > > fact of problem / quests
> > > > > > > its possible to use a php script, that logs in the other
> server
> > > an
> > > > > > > executes some commands.
> > > > > > > the problem one these line, is that it doesent execute /
> enter
> > > the
> > > > > > > password, so it is posible to emulate
> > > > > > > the enter button ?, that i think could be the first possible
> > > nice
> > > > > > > solution for me.
> > > > > > > exec("ssh -l root localhost ?? mypass or $VAR ?? \n ?? &&
> chown
> > > > > > $uid -R
> > > > > > > /data/$si");
> > > > > > >
> > > > > > > so if that isnt possible other ask: if i work now with
> > > > ssh-agent,RSA,
> > > > > > > other users can hack
> > > > > > > the connection (with a php script), because i have already
> an
> > > > > > configured
> > > > > > > autologin daemon
> > > > > > > and he use the same line ? like:
> > > > > > > exec("ssh -l root localhost --comand grep /etc/passwd >
> > > > > > > sendmailXxXxx.........");
> > > > > > >
> > > > > > > or are the last only realy reasonable resolution that i
> output
> > > > the -
> > > > > > php
> > > > > > > / webinterface / mysql - data
> > > > > > > to a file, that after i let to execute with a cronjob
> ? );-(/)
> > > > > > >
> > > > > > > thanks again mike....
> > > > > > > ----- Original Message -----
> > > > > > > From: Nathan Benson <phuzz
phactor.org>
> > > > > > > To: Mike Alexander Sauvain <msauvain
edv-support.ch>
> > > > > > > Cc: <php3
lists.php.net>
> > > > > > > Sent: Wednesday, May 10, 2000 12:23 AM
> > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > >
> > > > > > >
> > > > > > > > php doesn't have native ssh functions (that I know of),
> but
> > > > maybe
> > > > > > > > you could use exec() etc, with the ssh binaries along with
> RSA
> > > > keys
> > > > > > > > and ssh-agent to do what you were wanting? seeing as how
> your
> > > > > > message
> > > > > > > > wasn't very descriptive of what you were trying to
> accomplish
> > > i
> > > > can
> > > > > > > > only speculate. hope this is of some help.
> > > > > > > >
> > > > > > > > > can this work, to php let use ssh connections ?
> > > > > > > > >
> > > > > > > > > and where i find some related stuff about ?
> > > > > > > >
> > > > > > > > --
> > > > > > > > Nathan Benson
> > > > > > > > -------------
> > > > > > > > http://www.phactor.org/
> > > > > > > >
> > > > > > > > Me spell chuker work grate. Need grandma chicken.
> > > > > > > >
> > > > > > > > --
> > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > To unsubscribe, send an empty message to
> > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > To search the mailing list archive, go to:
> > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > To contact the list administrators, e-mail:
> > > > > > > php-list-admin
lists.php.net
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > To unsubscribe, send an empty message to
> > > > > > php3-unsubscribe
lists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > To search the mailing list archive, go to:
> > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > To contact the list administrators, e-mail:
> > > > > > php-list-admin
lists.php.net
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________________
> > > > > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > > > > >
> > > > > > > --
> > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > To unsubscribe, send an empty message to
> > > > > > php3-unsubscribe
lists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > To search the mailing list archive, go to:
> > > > > > http://www.php.net/mailsearch.php3
> > > > > > > To contact the list administrators, e-mail:
> > > > > > php-list-admin
lists.php.net
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > To unsubscribe, send an empty message to
> > > > php3-unsubscribe
lists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > php3-digest-subscribe
lists.php.net
> > > > > > To search the mailing list archive, go to:
> > > > > http://www.php.net/mailsearch.php3
> > > > > To contact the list administrators, e-mail:
> > > > php-list-admin
lists.php.net
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________________
> > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > >
> > >
> > >
> > >
> > > --
> > > PHP 3 Mailing List <http://www.php.net/>
> > > To unsubscribe, send an empty message to
> php3-unsubscribe
lists.php.net
> > > To subscribe to the digest, e-mail:
> php3-digest-subscribe
lists.php.net
> > > To search the mailing list archive, go to:
> > > http://www.php.net/mailsearch.php3
> > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > >
> > >
> > >
> >
> >
> > _______________________________________________________
> > Site Design, Hosting, and E-Commerce at www.webpipe.net
> >
>
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin
lists.php.net
_______________________________________________________
Site Design, Hosting, and E-Commerce at www.webpipe.net
attached mail follows:
./ssu -u root -p dfsdff -c dir
tail -f /var/log/messages say me:
pam_authenticate: PAM error: Authentication failure
but it list the directory anyway!!!!! urghl....
if i put the right password the error doesent come.......
----- Original Message -----
From: Jason <jasonc
webpipe.net>
To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
Cc: PHP Mailing List <php3
lists.php.net>
Sent: Thursday, May 11, 2000 7:33 PM
Subject: RE: [PHP3] php and ssh ?
> Then setuid to root like this 'chmod 4711 /path/to/ssu'. You also
need to
> make sure there is an entry in /etc/pam.d for ssu. You can just copy
the
> one for su.
>
> jason
>
> > -----Original Message-----
> > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > Sent: Thursday, May 11, 2000 11:26 AM
> > To: jasonc
webpipe.net
> > Cc: php3
lists.php.net
> > Subject: Re: [PHP3] php and ssh ?
> >
> >
> > sosorry, but if i do follow:
> > exec("./ssu -u root -p mypass -c 'ls'");
> > i recive that in my log:
> > Must be run as root or be setuid root
> >
> > how i can solve it ?
> >
> > ----- Original Message -----
> > From: Jason <jasonc
webpipe.net>
> > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > Sent: Thursday, May 11, 2000 7:02 PM
> > Subject: RE: [PHP3] php and ssh ?
> >
> >
> > > I don't think the second would work because you're authenticated
to
> > the
> > > local server not a remote one. You would have to establish a
> > connection to
> > > the remote server first.
> > >
> > > jason
> > >
> > > > -----Original Message-----
> > > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > > Sent: Thursday, May 11, 2000 7:57 AM
> > > > To: Jason Cox
> > > > Cc: php3
lists.php.net
> > > > Subject: Re: [PHP3] php and ssh ?
> > > >
> > > >
> > > > ./ssu -u root -p sfsfs -c 'mkdir /data && ls' <-- works
> > > >
> > > > ./ssu -u root -p sfsfs -c '/usr/bin/ssh myserver ls && ls --help
&&
> > > > /bin/mkdir /test/safhj'
> > > > dosent work: the first command is on the remote server,
> > > > the second command is one the local
server
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Jason Cox <jasonc
webpipe.net>
> > > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > > Sent: Thursday, May 11, 2000 7:54 AM
> > > > Subject: RE: [PHP3] php and ssh ?
> > > >
> > > >
> > > > > Like this:
> > > > > ./ssu -u root -p sfsfs -c 'mkdir /data'
> > > > > ./ssu -u root -p sfsfs -c 'reboot'
> > > > >
> > > > > You can only use one command at a time
> > > > >
> > > > > I definitely wouldn't run this as root though. That means
that
> > the
> > > > password
> > > > > would be somewhere where it could be had.
> > > > >
> > > > > jason
> > > > >
> > > > > -----Original Message-----
> > > > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > > > To: jasonc
webpipe.net
> > > > > Subject: Re: [PHP3] php and ssh ?
> > > > >
> > > > >
> > > > > im sorry, big question, how i can use space's ? like:
> > > > > ./ssu -u root -p sfsfs -c mkdir /data && reboot ??
> > > > >
> > > > > thanks again.......... mike
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Jason <jasonc
webpipe.net>
> > > > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > > > Sent: Wednesday, May 10, 2000 6:49 PM
> > > > > Subject: RE: [PHP3] php and ssh ?
> > > > >
> > > > >
> > > > > > Mike,
> > > > > >
> > > > > > Here you go...
> > > > > > It's released under the GPL. Please let me know if you make
any
> > > > > changes.
> > > > > >
> > > > > > jason
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Mike Alexander Sauvain
[mailto:msauvain
EDV-Support.ch]
> > > > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > > > To: Jason Cox
> > > > > > > Cc: php3
lists.php.net
> > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > >
> > > > > > >
> > > > > > > so this script could be interesting me principal, fact its
> > > > > combinable
> > > > > > > with a ssh command?
> > > > > > > hmm, please let me look in, it could be a part of my
problem
> > > > > resolution.
> > > > > > >
> > > > > > > thanks again... mike a. sauvain....
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: Jason Cox <jasonc
webpipe.net>
> > > > > > > To: <php3
lists.php.net>
> > > > > > > Sent: Wednesday, May 10, 2000 4:07 AM
> > > > > > > Subject: RE: [PHP3] php and ssh ?
> > > > > > >
> > > > > > >
> > > > > > > > I have a script called super 'su' that allows you to
login,
> > > > > execute a
> > > > > > > > command, and exit all in one command. This could be
used
> > via
> > > > the
> > > > > > > system()
> > > > > > > > function. It uses PAM and if used with a database,
could
> > allow
> > > > > users
> > > > > > > to
> > > > > > > > authenticate against it and run certain commands such as
> > 'chmod'
> > > > > > > without
> > > > > > > > making the system vulnerable. The syntax of the thing
goes
> > like
> > > > > this
> > > > > > > > "ssu -u [username] -p [passwork] -f '[commands]'". Let
me
> > know
> > > > if
> > > > > you
> > > > > > > want
> > > > > > > > more info.
> > > > > > > >
> > > > > > > > Jason
> > > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Mike Alexander Sauvain
> > [mailto:msauvain
EDV-Support.ch]
> > > > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > > > To: Nathan Benson
> > > > > > > > Cc: php3
lists.php.net
> > > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > > >
> > > > > > > >
> > > > > > > > re: 2001, so fact:
> > > > > > > > 1. make some directorys on diferent locations (servers),
> > that
> > > > > works,
> > > > > > > > like
> > > > > > > > mkdir ("/data/$si", 0700); // or // exec("md
> > /data/$si");
> > > > > > > > 2. chown, should run on dif. loc., example DONT work
because
> > the
> > > > > > > apache
> > > > > > > > runs
> > > > > > > > under nobody so it has no super user rights to do
that
> > > > > > > > passthru("chown 500 -R /data/mail/$si && chgrp
> > 500 -R
> > > > > > > > /data/mail/$si"); // or
> > > > > > > > exec()
> > > > > > > > system()
> > > > > > > > 3. maybe other commands directly fetched from php /
> > webinterface
> > > > /
> > > > > > > mysql
> > > > > > > > place
> > > > > > > >
> > > > > > > > fact of problem / quests
> > > > > > > > its possible to use a php script, that logs in the other
> > server
> > > > an
> > > > > > > > executes some commands.
> > > > > > > > the problem one these line, is that it doesent execute /
> > enter
> > > > the
> > > > > > > > password, so it is posible to emulate
> > > > > > > > the enter button ?, that i think could be the first
possible
> > > > nice
> > > > > > > > solution for me.
> > > > > > > > exec("ssh -l root localhost ?? mypass or $VAR ?? \n ??
&&
> > chown
> > > > > > > $uid -R
> > > > > > > > /data/$si");
> > > > > > > >
> > > > > > > > so if that isnt possible other ask: if i work now with
> > > > > ssh-agent,RSA,
> > > > > > > > other users can hack
> > > > > > > > the connection (with a php script), because i have
already
> > an
> > > > > > > configured
> > > > > > > > autologin daemon
> > > > > > > > and he use the same line ? like:
> > > > > > > > exec("ssh -l root localhost --comand grep /etc/passwd >
> > > > > > > > sendmailXxXxx.........");
> > > > > > > >
> > > > > > > > or are the last only realy reasonable resolution that i
> > output
> > > > > the -
> > > > > > > php
> > > > > > > > / webinterface / mysql - data
> > > > > > > > to a file, that after i let to execute with a cronjob
> > ? );-(/)
> > > > > > > >
> > > > > > > > thanks again mike....
> > > > > > > > ----- Original Message -----
> > > > > > > > From: Nathan Benson <phuzz
phactor.org>
> > > > > > > > To: Mike Alexander Sauvain <msauvain
edv-support.ch>
> > > > > > > > Cc: <php3
lists.php.net>
> > > > > > > > Sent: Wednesday, May 10, 2000 12:23 AM
> > > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > > >
> > > > > > > >
> > > > > > > > > php doesn't have native ssh functions (that I know
of),
> > but
> > > > > maybe
> > > > > > > > > you could use exec() etc, with the ssh binaries along
with
> > RSA
> > > > > keys
> > > > > > > > > and ssh-agent to do what you were wanting? seeing as
how
> > your
> > > > > > > message
> > > > > > > > > wasn't very descriptive of what you were trying to
> > accomplish
> > > > i
> > > > > can
> > > > > > > > > only speculate. hope this is of some help.
> > > > > > > > >
> > > > > > > > > > can this work, to php let use ssh connections ?
> > > > > > > > > >
> > > > > > > > > > and where i find some related stuff about ?
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Nathan Benson
> > > > > > > > > -------------
> > > > > > > > > http://www.phactor.org/
> > > > > > > > >
> > > > > > > > > Me spell chuker work grate. Need grandma chicken.
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > > To search the mailing list archive, go to:
> > > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > > To contact the list administrators, e-mail:
> > > > > > > > php-list-admin
lists.php.net
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > To unsubscribe, send an empty message to
> > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > To search the mailing list archive, go to:
> > > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > To contact the list administrators, e-mail:
> > > > > > > php-list-admin
lists.php.net
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________________
> > > > > > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > > > > > >
> > > > > > > > --
> > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > To unsubscribe, send an empty message to
> > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > To search the mailing list archive, go to:
> > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > To contact the list administrators, e-mail:
> > > > > > > php-list-admin
lists.php.net
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > To unsubscribe, send an empty message to
> > > > > php3-unsubscribe
lists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > php3-digest-subscribe
lists.php.net
> > > > > > > To search the mailing list archive, go to:
> > > > > > http://www.php.net/mailsearch.php3
> > > > > > To contact the list administrators, e-mail:
> > > > > php-list-admin
lists.php.net
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________________
> > > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP 3 Mailing List <http://www.php.net/>
> > > > To unsubscribe, send an empty message to
> > php3-unsubscribe
lists.php.net
> > > > To subscribe to the digest, e-mail:
> > php3-digest-subscribe
lists.php.net
> > > > To search the mailing list archive, go to:
> > > > http://www.php.net/mailsearch.php3
> > > > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> > > >
> > > >
> > > >
> > >
> > >
> > > _______________________________________________________
> > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > >
> >
> >
> >
> > --
> > PHP 3 Mailing List <http://www.php.net/>
> > To unsubscribe, send an empty message to
php3-unsubscribe
lists.php.net
> > To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
> > To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail:
php-list-admin
lists.php.net
>
>
>
>
> _______________________________________________________
> Site Design, Hosting, and E-Commerce at www.webpipe.net
>
attached mail follows:
sorry, i forgot to say, if i copied the /etc/pam.d/su file to ssu
no error resumes, but any way it executes the command whit wrong pass !
----- Original Message -----
From: Jason <jasonc
webpipe.net>
To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
Sent: Thursday, May 11, 2000 9:58 PM
Subject: RE: [PHP3] php and ssh ?
> You need to make sure there is an entry in the pam.d directory. It's
> probably /etc/pam.d, otherwise you'll get this error. It will still
try to
> execute the command even if you don't authenticate. It will just run
the
> command as the current user. Copy the 'su' entry in pam.d to 'ssu'
and it
> will work.
>
> jason
>
> > -----Original Message-----
> > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > Sent: Thursday, May 11, 2000 1:53 PM
> > To: jasonc
webpipe.net
> > Cc: PHP Mailing List
> > Subject: Re: [PHP3] php and ssh ?
> >
> >
> > ./ssu -u root -p dfsdff -c dir
> >
> > tail -f /var/log/messages say me:
> > pam_authenticate: PAM error: Authentication failure
> >
> > but it list the directory anyway!!!!! urghl....
> >
> > if i put the right password the error doesent come.......
> >
> >
> > ----- Original Message -----
> > From: Jason <jasonc
webpipe.net>
> > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > Cc: PHP Mailing List <php3
lists.php.net>
> > Sent: Thursday, May 11, 2000 7:33 PM
> > Subject: RE: [PHP3] php and ssh ?
> >
> >
> > > Then setuid to root like this 'chmod 4711 /path/to/ssu'. You also
> > need to
> > > make sure there is an entry in /etc/pam.d for ssu. You can just
copy
> > the
> > > one for su.
> > >
> > > jason
> > >
> > > > -----Original Message-----
> > > > From: Mike Alexander Sauvain [mailto:msauvain
EDV-Support.ch]
> > > > Sent: Thursday, May 11, 2000 11:26 AM
> > > > To: jasonc
webpipe.net
> > > > Cc: php3
lists.php.net
> > > > Subject: Re: [PHP3] php and ssh ?
> > > >
> > > >
> > > > sosorry, but if i do follow:
> > > > exec("./ssu -u root -p mypass -c 'ls'");
> > > > i recive that in my log:
> > > > Must be run as root or be setuid root
> > > >
> > > > how i can solve it ?
> > > >
> > > > ----- Original Message -----
> > > > From: Jason <jasonc
webpipe.net>
> > > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > > Sent: Thursday, May 11, 2000 7:02 PM
> > > > Subject: RE: [PHP3] php and ssh ?
> > > >
> > > >
> > > > > I don't think the second would work because you're
authenticated
> > to
> > > > the
> > > > > local server not a remote one. You would have to establish a
> > > > connection to
> > > > > the remote server first.
> > > > >
> > > > > jason
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mike Alexander Sauvain
[mailto:msauvain
EDV-Support.ch]
> > > > > > Sent: Thursday, May 11, 2000 7:57 AM
> > > > > > To: Jason Cox
> > > > > > Cc: php3
lists.php.net
> > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > >
> > > > > >
> > > > > > ./ssu -u root -p sfsfs -c 'mkdir /data && ls' <-- works
> > > > > >
> > > > > > ./ssu -u root -p sfsfs -c '/usr/bin/ssh myserver ls &&
ls --help
> > &&
> > > > > > /bin/mkdir /test/safhj'
> > > > > > dosent work: the first command is on the remote server,
> > > > > > the second command is one the local
> > server
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: Jason Cox <jasonc
webpipe.net>
> > > > > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > > > > Sent: Thursday, May 11, 2000 7:54 AM
> > > > > > Subject: RE: [PHP3] php and ssh ?
> > > > > >
> > > > > >
> > > > > > > Like this:
> > > > > > > ./ssu -u root -p sfsfs -c 'mkdir /data'
> > > > > > > ./ssu -u root -p sfsfs -c 'reboot'
> > > > > > >
> > > > > > > You can only use one command at a time
> > > > > > >
> > > > > > > I definitely wouldn't run this as root though. That means
> > that
> > > > the
> > > > > > password
> > > > > > > would be somewhere where it could be had.
> > > > > > >
> > > > > > > jason
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Mike Alexander Sauvain
[mailto:msauvain
EDV-Support.ch]
> > > > > > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > > > > > To: jasonc
webpipe.net
> > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > >
> > > > > > >
> > > > > > > im sorry, big question, how i can use space's ? like:
> > > > > > > ./ssu -u root -p sfsfs -c mkdir /data && reboot ??
> > > > > > >
> > > > > > > thanks again.......... mike
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: Jason <jasonc
webpipe.net>
> > > > > > > To: Mike Alexander Sauvain <msauvain
EDV-Support.ch>
> > > > > > > Sent: Wednesday, May 10, 2000 6:49 PM
> > > > > > > Subject: RE: [PHP3] php and ssh ?
> > > > > > >
> > > > > > >
> > > > > > > > Mike,
> > > > > > > >
> > > > > > > > Here you go...
> > > > > > > > It's released under the GPL. Please let me know if you
make
> > any
> > > > > > > changes.
> > > > > > > >
> > > > > > > > jason
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Mike Alexander Sauvain
> > [mailto:msauvain
EDV-Support.ch]
> > > > > > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > > > > > To: Jason Cox
> > > > > > > > > Cc: php3
lists.php.net
> > > > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > so this script could be interesting me principal, fact
its
> > > > > > > combinable
> > > > > > > > > with a ssh command?
> > > > > > > > > hmm, please let me look in, it could be a part of my
> > problem
> > > > > > > resolution.
> > > > > > > > >
> > > > > > > > > thanks again... mike a. sauvain....
> > > > > > > > >
> > > > > > > > > ----- Original Message -----
> > > > > > > > > From: Jason Cox <jasonc
webpipe.net>
> > > > > > > > > To: <php3
lists.php.net>
> > > > > > > > > Sent: Wednesday, May 10, 2000 4:07 AM
> > > > > > > > > Subject: RE: [PHP3] php and ssh ?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > I have a script called super 'su' that allows you to
> > login,
> > > > > > > execute a
> > > > > > > > > > command, and exit all in one command. This could be
> > used
> > > > via
> > > > > > the
> > > > > > > > > system()
> > > > > > > > > > function. It uses PAM and if used with a database,
> > could
> > > > allow
> > > > > > > users
> > > > > > > > > to
> > > > > > > > > > authenticate against it and run certain commands
such as
> > > > 'chmod'
> > > > > > > > > without
> > > > > > > > > > making the system vulnerable. The syntax of the
thing
> > goes
> > > > like
> > > > > > > this
> > > > > > > > > > "ssu -u [username] -p [passwork] -f '[commands]'".
Let
> > me
> > > > know
> > > > > > if
> > > > > > > you
> > > > > > > > > want
> > > > > > > > > > more info.
> > > > > > > > > >
> > > > > > > > > > Jason
> > > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Mike Alexander Sauvain
> > > > [mailto:msauvain
EDV-Support.ch]
> > > > > > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > > > > > To: Nathan Benson
> > > > > > > > > > Cc: php3
lists.php.net
> > > > > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > re: 2001, so fact:
> > > > > > > > > > 1. make some directorys on diferent locations
(servers),
> > > > that
> > > > > > > works,
> > > > > > > > > > like
> > > > > > > > > > mkdir ("/data/$si", 0700); // or // exec("md
> > > > /data/$si");
> > > > > > > > > > 2. chown, should run on dif. loc., example DONT work
> > because
> > > > the
> > > > > > > > > apache
> > > > > > > > > > runs
> > > > > > > > > > under nobody so it has no super user rights to
do
> > that
> > > > > > > > > > passthru("chown 500 -R /data/mail/$si &&
chgrp
> > > > 500 -R
> > > > > > > > > > /data/mail/$si"); // or
> > > > > > > > > > exec()
> > > > > > > > > > system()
> > > > > > > > > > 3. maybe other commands directly fetched from php /
> > > > webinterface
> > > > > > /
> > > > > > > > > mysql
> > > > > > > > > > place
> > > > > > > > > >
> > > > > > > > > > fact of problem / quests
> > > > > > > > > > its possible to use a php script, that logs in the
other
> > > > server
> > > > > > an
> > > > > > > > > > executes some commands.
> > > > > > > > > > the problem one these line, is that it doesent
execute /
> > > > enter
> > > > > > the
> > > > > > > > > > password, so it is posible to emulate
> > > > > > > > > > the enter button ?, that i think could be the first
> > possible
> > > > > > nice
> > > > > > > > > > solution for me.
> > > > > > > > > > exec("ssh -l root localhost ?? mypass or $VAR ?? \n
??
> > &&
> > > > chown
> > > > > > > > > $uid -R
> > > > > > > > > > /data/$si");
> > > > > > > > > >
> > > > > > > > > > so if that isnt possible other ask: if i work now
with
> > > > > > > ssh-agent,RSA,
> > > > > > > > > > other users can hack
> > > > > > > > > > the connection (with a php script), because i have
> > already
> > > > an
> > > > > > > > > configured
> > > > > > > > > > autologin daemon
> > > > > > > > > > and he use the same line ? like:
> > > > > > > > > > exec("ssh -l root localhost --comand grep
/etc/passwd >
> > > > > > > > > > sendmailXxXxx.........");
> > > > > > > > > >
> > > > > > > > > > or are the last only realy reasonable resolution
that i
> > > > output
> > > > > > > the -
> > > > > > > > > php
> > > > > > > > > > / webinterface / mysql - data
> > > > > > > > > > to a file, that after i let to execute with a
cronjob
> > > > ? );-(/)
> > > > > > > > > >
> > > > > > > > > > thanks again mike....
> > > > > > > > > > ----- Original Message -----
> > > > > > > > > > From: Nathan Benson <phuzz
phactor.org>
> > > > > > > > > > To: Mike Alexander Sauvain <msauvain
edv-support.ch>
> > > > > > > > > > Cc: <php3
lists.php.net>
> > > > > > > > > > Sent: Wednesday, May 10, 2000 12:23 AM
> > > > > > > > > > Subject: Re: [PHP3] php and ssh ?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > php doesn't have native ssh functions (that I know
> > of),
> > > > but
> > > > > > > maybe
> > > > > > > > > > > you could use exec() etc, with the ssh binaries
along
> > with
> > > > RSA
> > > > > > > keys
> > > > > > > > > > > and ssh-agent to do what you were wanting? seeing
as
> > how
> > > > your
> > > > > > > > > message
> > > > > > > > > > > wasn't very descriptive of what you were trying to
> > > > accomplish
> > > > > > i
> > > > > > > can
> > > > > > > > > > > only speculate. hope this is of some help.
> > > > > > > > > > >
> > > > > > > > > > > > can this work, to php let use ssh connections ?
> > > > > > > > > > > >
> > > > > > > > > > > > and where i find some related stuff about ?
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Nathan Benson
> > > > > > > > > > > -------------
> > > > > > > > > > > http://www.phactor.org/
> > > > > > > > > > >
> > > > > > > > > > > Me spell chuker work grate. Need grandma chicken.
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > > > > To search the mailing list archive, go to:
> > > > > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > > > > To contact the list administrators, e-mail:
> > > > > > > > > > php-list-admin
lists.php.net
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > > > To search the mailing list archive, go to:
> > > > > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > > > To contact the list administrators, e-mail:
> > > > > > > > > php-list-admin
lists.php.net
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
_______________________________________________________
> > > > > > > > > > Site Design, Hosting, and E-Commerce at
www.webpipe.net
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > > > To search the mailing list archive, go to:
> > > > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > > > To contact the list administrators, e-mail:
> > > > > > > > > php-list-admin
lists.php.net
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > php3-unsubscribe
lists.php.net
> > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribe
lists.php.net
> > > > > > > > > To search the mailing list archive, go to:
> > > > > > > > http://www.php.net/mailsearch.php3
> > > > > > > > To contact the list administrators, e-mail:
> > > > > > > php-list-admin
lists.php.net
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________________
> > > > > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > To unsubscribe, send an empty message to
> > > > php3-unsubscribe
lists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > php3-digest-subscribe
lists.php.net
> > > > > > To search the mailing list archive, go to:
> > > > > > http://www.php.net/mailsearch.php3
> > > > > > To contact the list administrators, e-mail:
> > > > php-list-admin
lists.php.net
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > _______________________________________________________
> > > > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP 3 Mailing List <http://www.php.net/>
> > > > To unsubscribe, send an empty message to
> > php3-unsubscribe
lists.php.net
> > > > To subscribe to the digest, e-mail:
> > php3-digest-subscribe
lists.php.net
> > > > To search the mailing list archive, go to:
> > > http://www.php.net/mailsearch.php3
> > > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> > >
> > >
> > >
> > >
> > > _______________________________________________________
> > > Site Design, Hosting, and E-Commerce at www.webpipe.net
> > >
> >
> >
> >
> > --
> > PHP 3 Mailing List <http://www.php.net/>
> > To unsubscribe, send an empty message to
php3-unsubscribe
lists.php.net
> > To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
> > To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail:
php-list-admin
lists.php.net
>
>
>
>
> _______________________________________________________
> Site Design, Hosting, and E-Commerce at www.webpipe.net
>
attached mail follows:
Folks,
I'm looking to do something with regex that I can't get to work very well.
I'm submitting data to a form. The data will be of this format:
"I like the [Dave Matthews Band] and [The Hogwaller Ramblers], they're the
best bands that I've ever seen at [Trax]."
Each bracketed section should become a link. So I want regex to go through
and pull each of these out of the database and link to that data in a
different section of the site. The problem here is that I can't get regex