NYCPHP Meetup

NYPHP.org

[nycphp-talk] SSH2_CONNECT

Michele Waldman mmwaldman at nyc.rr.com
Thu Jul 30 15:44:28 EDT 2009


Will sudo work from the php script?  That would work for me.

 

Basically, I'm looking through domain names gotten from mysql and copying
files from a template directory in one domain to the other domains.

 

Sudo has been setup for the user, but I didn't know if it would work or how
it works or what function to use from php?

 

Michele

  _____  

From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Justin Dearing
Sent: Thursday, July 30, 2009 3:42 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] SSH2_CONNECT

 

Why not use sudo? or run a damon as the other user that performs the task
you need.

What exactly does the other user need to do?

 

On Thu, Jul 30, 2009 at 3:35 PM, Ajai Khattri <ajai at bitblit.net> wrote:

On Thu, 30 Jul 2009, Michele Waldman wrote:

> The scenario is I'm running a php script but I want to switch linix users?
>
> Do I have to use ssh2?  I would have to go off the server and come back in
> just to switch users?

Only root can change user and I doubt your script will be running as root
(otherwise any PHP scrpt could become any user and wreak havoc on a
server!).


This begs the question: why do you need to change user?



--
Aj.


_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show_participation.php

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090730/96db5639/attachment.html>


More information about the talk mailing list