OSEC

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-helplists.php.net
Date: Thu May 11 2000 - 22:54:57 CDT


php3 Digest 12 May 2000 03:54:57 -0000 Issue 1665

Topics (messages 89982 through 90089):

Newbie question
        89982 by: "Robert V. Zwink" <rzwinkmicrocenter.com>

almost... zeus with php4RC2
        89983 by: Dave Goodrich <davegrblc.com>

php and ssh ?
        89984 by: "Mike Alexander Sauvain" <msauvainEDV-Support.ch>
        89987 by: "Jason" <jasoncwebpipe.net>
        90000 by: "Mike Alexander Sauvain" <msauvainEDV-Support.ch>
        90001 by: "Mike Alexander Sauvain" <msauvainEDV-Support.ch>

Auto-Linking Marked-Up Text
        89985 by: "Waldo L. Jaquith" <waldowaldo.net>

Zeus with php4RC2 = success
        89986 by: Dave Goodrich <davegrblc.com>

PHP on FreeBSD?
        89988 by: Kim Shrier <kimtinker.com>

php4RC2 question about the empty() function
        89989 by: "Brandt Everett" <everettbentonrea.com>
        90053 by: richardzend.com (Richard Lynch)

Does PHP + CCVS work?
        89990 by: Paul Meagher <phpdatavore.com>

Newbie Help
        89991 by: Robert Hough <rchqserve.net>
        90002 by: richardzend.com (Richard Lynch)

get_browser function
        89992 by: Bug Hunter <bughuntrone.ctelcom.net>
        90009 by: richardzend.com (Richard Lynch)
        90015 by: Rob Hardowa <roblionofzion.com>

SMall bit of graphics help
        89993 by: "Wizaerd" <wizaerdwizaerd.com>
        90021 by: Gregor Welters <gregorwelters.de>
        90026 by: "Jason" <jasoncwebpipe.net>
        90052 by: richardzend.com (Richard Lynch)

A thanks and question
        89994 by: Jeremy Gibson <jmgibson1home.com>

phpMyAdmin problems
        89995 by: Michael Holm <michael.holmwebjones.com>

now reading a file in a loop, but going past EOF !
        89996 by: "Ted Knudson" <tedkcyberlink.com>
        90039 by: richardzend.com (Richard Lynch)
        90054 by: richardzend.com (Richard Lynch)
        90058 by: Francis Smit <franciskbd.com.au>

Fw: [PHP3] php4RC2 question about the empty() function
        89997 by: "Jerry" <php_listlucard.to>
        89999 by: "Brandt Everett" <everettbentonrea.com>
        90046 by: Lars Torben Wilson <torbenpinc.com>

Timeout for fgets?
        89998 by: Andrei Zmievski <andreiispi.net>
        90032 by: richardzend.com (Richard Lynch)
        90034 by: Andrei Zmievski <andreiispi.net>

can't find php.ini
        90003 by: "darcy w. christ" <darcyelegant.com>

splitting strings
        90004 by: richardzend.com (Richard Lynch)
        90017 by: Gregor Welters <gregorwelters.de>
        90023 by: eschmid+sics.netic.de
        90040 by: Gregor Welters <gregorwelters.de>
        90044 by: eschmid+sics.netic.de
        90050 by: Gregor Welters <gregorwelters.de>
        90060 by: Paul DuBois <paulsnake.net>

Instalando o webmail IMP - SOCORRRO
        90005 by: "Jackson Ricardo Schroeder" <jacksonpwr.com.br>
        90008 by: Vidyut Luther <vluthergotslack.com>

(OT) Source control?
        90006 by: richardzend.com (Richard Lynch)

Refreshing in a new frame?
        90007 by: richardzend.com (Richard Lynch)
        90016 by: Gregor Welters <gregorwelters.de>

php3_asp_tags
        90010 by: shhricochet.net
        90038 by: Matt McClanahan <cardinaldodds.net>

Slide show program problem
        90011 by: richardzend.com (Richard Lynch)

Shuffle
        90012 by: richardzend.com (Richard Lynch)

how to use sizeof() with trwo-dimensional array
        90013 by: Gregor Welters <gregorwelters.de>

PHP3 Extensions
        90014 by: "Thomas E. Ruth" <truthichaos.com>

security for admin pages....
        90018 by: richardzend.com (Richard Lynch)

SUM in query
        90019 by: richardzend.com (Richard Lynch)

Array transfomation
        90020 by: Gregor Welters <gregorwelters.de>

problem with php3.0.16 with apache 1.3.12-2
        90022 by: richardzend.com (Richard Lynch)

gpc_globals
        90024 by: richardzend.com (Richard Lynch)

It is possible to pass methods to session_set_save_handler()?
        90025 by: richardzend.com (Richard Lynch)

Using a while loop to read in a line of text
        90027 by: richardzend.com (Richard Lynch)
        90083 by: Samuel Leibowitz <sleibowidilithium.btcwcu.org>

Zoom Image Effect in Php and Python
        90028 by: richardzend.com (Richard Lynch)

Frames and PHP
        90029 by: richardzend.com (Richard Lynch)
        90041 by: "Paul Burney" <burneygseis.ucla.edu>

Lotus Notes
        90030 by: richardzend.com (Richard Lynch)

date functions (sql related)
        90031 by: Dieter Kneffel <datawap4.com>

zend optimizer
        90033 by: "Morgan Harvey" <morgananomalyinc.com>
        90047 by: "Jason" <jasoncwebpipe.net>
        90048 by: "Tyler Longren" <tyler.longrenmidiowa.net>
        90057 by: "Morgan Harvey" <morgananomalyinc.com>
        90059 by: "Jason" <jasoncwebpipe.net>
        90061 by: "Morgan Harvey" <morgananomalyinc.com>

Showing raw img data ?
        90035 by: richardzend.com (Richard Lynch)

Changes for Migrating to PHP4
        90036 by: richardzend.com (Richard Lynch)
        90063 by: "Andrew Smith" <listscadre.com.au>

PHP code OR MySQL Table Join ???
        90037 by: Rob Hardowa <roblionofzion.com>
        90051 by: richardzend.com (Richard Lynch)
        90078 by: Rob Hardowa <roblionofzion.com>

How to send a POST request to a php script (without a form submit)
        90042 by: richardzend.com (Richard Lynch)

Fw: How to send a POST request to a php script (without a form submit)
        90043 by: richardzend.com (Richard Lynch)

odbc_fetch_row - always getting the same row
        90045 by: richardzend.com (Richard Lynch)

PHP-Authorisation under NT
        90049 by: richardzend.com (Richard Lynch)
        90064 by: "Andrew Smith" <listscadre.com.au>

Member login
        90055 by: Bernie Huang <bernie.huangec.gc.ca>

JavaScript script value inside PHP code
        90056 by: Francis Smit <franciskbd.com.au>
        90062 by: Francis Smit <franciskbd.com.au>

randomizing select queries
        90065 by: Bill Zeller <billzelleryahoo.com>
        90068 by: Nathan Wallace <nathansynop.com>

Trapping Invalid MySQL Result ID's in fetch_array
        90066 by: Daniel Convissor <danielcanalysisandsolutions.com>
        90067 by: "Jason Brooke" <jasonqgl.org>
        90071 by: Daniel Convissor <danielcanalysisandsolutions.com>
        90075 by: Rob Hardowa <roblionofzion.com>

the php performance using a lot of "include"
        90069 by: liwei <liweisepaeic.gov.cn>
        90086 by: Ron Chmara <ronOpus1.COM>

How I could use value in mysql variable??
        90070 by: yongraeitventure.co.kr
        90082 by: Daniel Convissor <danielcanalysisandsolutions.com>

Regex Challenge
        90072 by: "SANIsoft" <tariquenagpur.dot.net.in>

Get mime type?
        90073 by: "Josh McDonald" <joshisa.net.au>
        90074 by: Brent Sims <brentwebokay.com>
        90085 by: "Andrew Smith" <listscadre.com.au>

File download (almost got it)
        90076 by: "Josh McDonald" <joshisa.net.au>
        90087 by: "Andrew Smith" <listscadre.com.au>

I want to change the links in the left when the "content" is changed in PHP
        90077 by: liwei <liweisepaeic.gov.cn>

randomizing select queries PLEASE READ
        90079 by: Bill Zeller <billzelleryahoo.com>
        90080 by: Bill Zeller <billzelleryahoo.com>

randomizing select queries PLEASE HELP!!!
        90081 by: Nathan Wallace <nathansynop.com>

Gnutella search
        90084 by: okancyberserver.org

PHP - How to Create Dyanamic URL's
        90088 by: "Saji D" <sajihcl.co.in>
        90089 by: "Jay Thomas" <jayranchoweb.com>

Administrivia:

To subscribe to the digest, e-mail:
        php3-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php3-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php3lists.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-unsubscribelists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribelists.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-adminlists.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 <jasoncwebpipe.net>
To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > Sent: Thursday, May 11, 2000 7:57 AM
> > To: Jason Cox
> > Cc: php3lists.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 <jasoncwebpipe.net>
> > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > To: jasoncwebpipe.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 <jasoncwebpipe.net>
> > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > To: Jason Cox
> > > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > > To: <php3lists.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:msauvainEDV-Support.ch]
> > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > To: Nathan Benson
> > > > > > Cc: php3lists.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 <phuzzphactor.org>
> > > > > > To: Mike Alexander Sauvain <msauvainedv-support.ch>
> > > > > > Cc: <php3lists.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-unsubscribelists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > To unsubscribe, send an empty message to
> > > > > php3-unsubscribelists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > To unsubscribe, send an empty message to
> > > php3-unsubscribelists.php.net
> > > > > To subscribe to the digest, e-mail:
> > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > To subscribe to the digest, e-mail:
php3-digest-subscribelists.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-adminlists.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:msauvainEDV-Support.ch]
> Sent: Thursday, May 11, 2000 11:26 AM
> To: jasoncwebpipe.net
> Cc: php3lists.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 <jasoncwebpipe.net>
> To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > Sent: Thursday, May 11, 2000 7:57 AM
> > > To: Jason Cox
> > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > > To: jasoncwebpipe.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 <jasoncwebpipe.net>
> > > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > > To: Jason Cox
> > > > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > > > To: <php3lists.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:msauvainEDV-Support.ch]
> > > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > > To: Nathan Benson
> > > > > > > Cc: php3lists.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 <phuzzphactor.org>
> > > > > > > To: Mike Alexander Sauvain <msauvainedv-support.ch>
> > > > > > > Cc: <php3lists.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-unsubscribelists.php.net
> > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > To unsubscribe, send an empty message to
> > > > > > php3-unsubscribelists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > To unsubscribe, send an empty message to
> > > > php3-unsubscribelists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > To subscribe to the digest, e-mail:
> php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribelists.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-adminlists.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 <jasoncwebpipe.net>
To: Mike Alexander Sauvain <msauvainEDV-Support.ch>
Cc: PHP Mailing List <php3lists.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:msauvainEDV-Support.ch]
> > Sent: Thursday, May 11, 2000 11:26 AM
> > To: jasoncwebpipe.net
> > Cc: php3lists.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 <jasoncwebpipe.net>
> > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > Sent: Thursday, May 11, 2000 7:57 AM
> > > > To: Jason Cox
> > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > > > To: jasoncwebpipe.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 <jasoncwebpipe.net>
> > > > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > > > To: Jason Cox
> > > > > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > > > > To: <php3lists.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:msauvainEDV-Support.ch]
> > > > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > > > To: Nathan Benson
> > > > > > > > Cc: php3lists.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 <phuzzphactor.org>
> > > > > > > > To: Mike Alexander Sauvain <msauvainedv-support.ch>
> > > > > > > > Cc: <php3lists.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-unsubscribelists.php.net
> > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > To unsubscribe, send an empty message to
> > > > > > > php3-unsubscribelists.php.net
> > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > To unsubscribe, send an empty message to
> > > > > php3-unsubscribelists.php.net
> > > > > > > To subscribe to the digest, e-mail:
> > > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > To subscribe to the digest, e-mail:
> > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > To subscribe to the digest, e-mail:
php3-digest-subscribelists.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-adminlists.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 <jasoncwebpipe.net>
To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > Sent: Thursday, May 11, 2000 1:53 PM
> > To: jasoncwebpipe.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 <jasoncwebpipe.net>
> > To: Mike Alexander Sauvain <msauvainEDV-Support.ch>
> > Cc: PHP Mailing List <php3lists.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:msauvainEDV-Support.ch]
> > > > Sent: Thursday, May 11, 2000 11:26 AM
> > > > To: jasoncwebpipe.net
> > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > > Sent: Thursday, May 11, 2000 7:57 AM
> > > > > > To: Jason Cox
> > > > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > > > Sent: Wednesday, May 10, 2000 8:03 PM
> > > > > > > To: jasoncwebpipe.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 <jasoncwebpipe.net>
> > > > > > > To: Mike Alexander Sauvain <msauvainEDV-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:msauvainEDV-Support.ch]
> > > > > > > > > Sent: Wednesday, May 10, 2000 6:22 AM
> > > > > > > > > To: Jason Cox
> > > > > > > > > Cc: php3lists.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 <jasoncwebpipe.net>
> > > > > > > > > To: <php3lists.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:msauvainEDV-Support.ch]
> > > > > > > > > > Sent: Tuesday, May 09, 2000 6:59 PM
> > > > > > > > > > To: Nathan Benson
> > > > > > > > > > Cc: php3lists.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 <phuzzphactor.org>
> > > > > > > > > > To: Mike Alexander Sauvain <msauvainedv-support.ch>
> > > > > > > > > > Cc: <php3lists.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-unsubscribelists.php.net
> > > > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > > > php3-unsubscribelists.php.net
> > > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > > > php3-digest-subscribelists.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-adminlists.php.net
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > PHP 3 Mailing List <http://www.php.net/>
> > > > > > > > > To unsubscribe, send an empty message to
> > > > > > > php3-unsubscribelists.php.net
> > > > > > > > > To subscribe to the digest, e-mail:
> > > > > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > > > To subscribe to the digest, e-mail:
> > > > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > > > To subscribe to the digest, e-mail:
> > php3-digest-subscribelists.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-adminlists.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-unsubscribelists.php.net
> > To subscribe to the digest, e-mail:
php3-digest-subscribelists.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-adminlists.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