Re: [nyphp-talk] SSH2_CONNECT

2009-08-02 Thread Leam Hall
Kenneth Dombrowski wrote: On 09-08-01 09:44 -0400, Ajai Khattri wrote: If you can peform the task without it, which is true in this case, then do so. Ok, point taken. Thanks Aj No argument there. What you can do, and what you should do, are often not the same. :) Leam __

Re: [nyphp-talk] SSH2_CONNECT

2009-08-01 Thread Kenneth Dombrowski
On 09-08-01 09:44 -0400, Ajai Khattri wrote: > I think history has shown that most programmers are not system > administrators and often dont think through all the implications of what > they're doing. So, in that context, I dont think its extreme to say not to > mess with it. If you can peform

Re: [nyphp-talk] SSH2_CONNECT

2009-08-01 Thread Ajai Khattri
On Sat, 1 Aug 2009, Kenneth Dombrowski wrote: > That's ridiculous, it's a system config file meant to be configured. > "Be careful", yes, but "Don't touch it" is a bit extreme. I think history has shown that most programmers are not system administrators and often dont think through all the impl

Re: [nyphp-talk] SSH2_CONNECT

2009-08-01 Thread Kenneth Dombrowski
On 09-07-31 20:39 -0400, CED wrote: > Adjusting the defaults to sudoers is a big no no. That's ridiculous, it's a system config file meant to be configured. "Be careful", yes, but "Don't touch it" is a bit extreme. > Whatever it is you are doing, the need to become root is far different > than K

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Ajai Khattri
On Fri, 31 Jul 2009, CED wrote: > Play VERY carefully. Or just use FTP/SCP and dont mess with any security settings. -- Aj. ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/s

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread CED
Leam Hall wrote: CED wrote: Leam Hall wrote: http://forums.fedoraforum.org/showthread.php?t=159677 [r...@leam ~]# grep -i tty /etc/sudoers Defaultsrequiretty That might help. :) Leam Please DO NOT use Leam's example... "Defaults requiretty" is a global sudoers security default, c

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
Thank you. Michele > -Original Message- > From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of CED > Sent: Friday, July 31, 2009 8:39 PM > To: NYPHP Talk > Subject: Re: [nyphp-talk] SSH2_CONNECT > > > I'll take the bai

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
CED wrote: Leam Hall wrote: http://forums.fedoraforum.org/showthread.php?t=159677 [r...@leam ~]# grep -i tty /etc/sudoers Defaultsrequiretty That might help. :) Leam Please DO NOT use Leam's example... "Defaults requiretty" is a global sudoers security default, change the default

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread CED
chele -Original Message- From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On Behalf Of Leam Hall Sent: Friday, July 31, 2009 8:22 PM To: NYPHP Talk Subject: Re: [nyphp-talk] SSH2_CONNECT Drat! That's my favorite reading. :) Couple more ideas, based on an OS p

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread CED
I'll take the bait... No, you most certainly shouldn't do this at all. Adjusting the defaults to sudoers is a big no no. Whatever it is you are doing, the need to become root is far different than Ken's example of becoming Ken. The reason that you can't make this work properly has everythi

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
ssage- From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On Behalf Of Leam Hall Sent: Friday, July 31, 2009 8:22 PM To: NYPHP Talk Subject: Re: [nyphp-talk] SSH2_CONNECT Drat! That's my favorite reading. :) Couple more ideas, based on an OS perspective. If it'

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
NYPHP Talk > Subject: Re: [nyphp-talk] SSH2_CONNECT > > Drat! That's my favorite reading. :) > > Couple more ideas, based on an OS perspective. If it's a PHPism, I'm not > so good... > > If the copy_sites program is a script and not a binary, edit it early

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
dn't see anything in /var/log/messages. Michele -Original Message- From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On Behalf Of Leam Hall Sent: Friday, July 31, 2009 7:58 PM To: NYPHP Talk Subject: Re: [nyphp-talk] SSH2_CONNECT Hey Michele. Can you edit /etc/sudoers

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
iginal Message- From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On Behalf Of Kenneth Dombrowski Sent: Friday, July 31, 2009 7:33 AM To: NYPHP Talk Subject: Re: [nyphp-talk] SSH2_CONNECT On 09-07-30 17:05 -0400, Ajai Khattri wrote: Most probably your PHP script will be ru

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
I didn't see anything in /var/log/messages. Michele > -Original Message- > From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of Leam Hall > Sent: Friday, July 31, 2009 7:58 PM > To: NYPHP Talk > Subject: Re: [nyphp-talk] SSH2_C

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
ki Sent: Friday, July 31, 2009 7:33 AM To: NYPHP Talk Subject: Re: [nyphp-talk] SSH2_CONNECT On 09-07-30 17:05 -0400, Ajai Khattri wrote: Most probably your PHP script will be running under the same username as Apache (i.e. www or nobody) so sudo wouldn't work anyway. (And you wouldn't

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
g [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of Kenneth Dombrowski > Sent: Friday, July 31, 2009 7:33 AM > To: NYPHP Talk > Subject: Re: [nyphp-talk] SSH2_CONNECT > > On 09-07-30 17:05 -0400, Ajai Khattri wrote: > > Most probably your PHP script will be running under t

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Kenneth Dombrowski
On 09-07-30 17:05 -0400, Ajai Khattri wrote: > Most probably your PHP script will be running under the same username as > Apache (i.e. www or nobody) so sudo wouldn't work anyway. (And you > wouldn't want to give www or nobody sudo privilege anyway!). All this talk about sudo not working made me

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Ajai Khattri
On Thu, 30 Jul 2009, Michele Waldman wrote: > 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

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Hans Zaunere
> Are you sure? yah, pretty much - if you want to connect to a server using ssh, then this is the way to go... > 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? Wh

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Michele Waldman
That's what I was originally thinking. I was hoping for a way around. Michele > -Original Message- > From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of John Campbell > Sent: Thursday, July 30, 2009 4:00 PM > To: NYPHP Talk > S

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread John Campbell
On Thu, Jul 30, 2009 at 3:44 PM, Michele Waldman wrote: > Will sudo work from the php script?  That would work for me. Unfortunately it won't work. I am not sure what the problem you are having is, but my instinct tells me the correct solution has something to do with groups and permissions. Reg

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Michele Waldman
t works or what function to use from php? Michele _ From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On Behalf Of Justin Dearing Sent: Thursday, July 30, 2009 3:42 PM To: NYPHP Talk Subject: Re: [nyphp-talk] SSH2_CONNECT Why not use sudo? or run a damon as

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Justin Dearing
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 wrote: > On Thu, 30 Jul 2009, Michele Waldman wrote: > > > The scenario is I'm running a php script but I want to switch

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Ajai Khattri
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

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Michele Waldman
o:talk-boun...@lists.nyphp.org] > On Behalf Of Hans Zaunere > Sent: Thursday, July 30, 2009 2:58 PM > To: 'NYPHP Talk' > Subject: Re: [nyphp-talk] SSH2_CONNECT > > > If I'm on a server already what function can I use to connect as > > another user? > > Seems

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Hans Zaunere
> If I'm on a server already what function can I use to connect as > another user? Seems like a reasonable choice: http://us2.php.net/manual/en/function.ssh2-connect.php Then you'll probably want: http://us2.php.net/manual/en/function.ssh2-auth-password.php H

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Michele Waldman
NYPHP Talk' > Subject: Re: [nyphp-talk] SSH2_CONNECT > > > Does anyone know if you need a library for SSH2_CONNECT? > > > > If so, which one? > > http://us2.php.net/manual/en/ssh2.installation.php > > Most

Re: [nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Hans Zaunere
> Does anyone know if you need a library for SSH2_CONNECT? > > If so, which one? http://us2.php.net/manual/en/ssh2.installation.php Most (all?) unix systems should have the required libs already. H ___ New York PHP User Group Community Talk Mailing

[nyphp-talk] SSH2_CONNECT

2009-07-30 Thread Michele Waldman
Does anyone know if you need a library for SSH2_CONNECT? If so, which one? Margaret Michele Waldman Sovereign Sites L.L.C. Website Development 646-861-3375 Rule your domain ... ___ New York PHP User Group Community Talk Mailing List http:/