Find the answer to your Linux question:
Results 1 to 3 of 3
Hey So i'm working on a small simple servermanagement app in php to manage the ubuntu server. Someone told me I have to use the shell_exec() command in php to ...
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3

    adding users in php with shell_exec() command?

    Hey

    So i'm working on a small simple servermanagement app in php to manage the ubuntu server.

    Someone told me I have to use the shell_exec() command in php to execute the commandlines in ubuntu.

    I did a ping test wich works...
    PHP Code:
    $ping shell_exec('ping -c 1 -w 1 google.com');
    echo 
    "<pre>{$ping}</pre>"
    But now I want to add a user, so from my understanding I could just do this...
    PHP Code:
    $user $_POST['user'];
    $out shell_exec('adduser' .$user); 
    But I can't seem to add any users.
    When I list my user using "users" command in ubuntu, I only see my loginname.

    How do I add users using php?

  2. #2
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3
    Please someone help me out. I need to do a lot of root command through this php application.

    I need to know how I can do root commands via php
    I know it's shell_exec() but not all the commands work.

    Can someone help me out?

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3
    do I need to do something on the ubuntu server before I can use this shell_exec() function?

    I've tried everything I could find and I'm at the end of my rope here!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...