running system() as root user

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • *

    #1

    running system() as root user

    Is there a way that I can run the system() command as a root user. Need to
    restart network services on a server via php.



  • Alvaro G Vicario

    #2
    Re: running system() as root user

    *** * wrote/escribió (Tue, 15 Jun 2004 11:03:32 +0100):[color=blue]
    > Is there a way that I can run the system() command as a root user. Need to
    > restart network services on a server via php.[/color]

    Check "sudo". I haven't used it but it should solve your problem.

    --
    --
    -- Álvaro G. Vicario - Burgos, Spain
    --

    Comment

    • Garp

      #3
      Re: running system() as root user


      "Alvaro G Vicario" <alvaro_QUITAR_ REMOVE@telecomp uteronline.com> wrote in
      message news:1ppb9hqgau 6a6$.1rkm3gyx40 xls.dlg@40tude. net...[color=blue]
      > *** * wrote/escribió (Tue, 15 Jun 2004 11:03:32 +0100):[color=green]
      > > Is there a way that I can run the system() command as a root user. Need[/color][/color]
      to[color=blue][color=green]
      > > restart network services on a server via php.[/color]
      >
      > Check "sudo". I haven't used it but it should solve your problem.[/color]

      Mm, Apache as a sudoer... If you get it working, post what happens, OP, I'm
      morbidly curious.

      Garp


      Comment

      • Chris Hope

        #4
        Re: running system() as root user

        Garp wrote:
        [color=blue]
        > Mm, Apache as a sudoer... If you get it working, post what happens, OP,
        > I'm morbidly curious.[/color]

        And I sure hope there's no one else running sites on your box. The fun they
        could have...

        Comment

        • *

          #5
          Re: running system() as root user

          I gave up trying to do it that way. I managed to get the result I wanted by
          using webmin.


          "Chris Hope" <chris@electric toolbox.com> wrote in message
          news:1087339013 _6554@216.128.7 4.129...[color=blue]
          > Garp wrote:
          >[color=green]
          > > Mm, Apache as a sudoer... If you get it working, post what happens, OP,
          > > I'm morbidly curious.[/color]
          >
          > And I sure hope there's no one else running sites on your box. The fun[/color]
          they[color=blue]
          > could have...
          >[/color]


          Comment

          Working...