PHP doubts

From: Rajiv (jrajiv_at_hclinsys.com)
Date: 03/31/05

  • Next message: Espen Stefansen: "Re: Problem with NFS after updating util-linux"
    To: <fedora-list@redhat.com>
    Date: Thu, 31 Mar 2005 19:57:17 +0530
    
    

    Dear All,
        I am able do add password using the following PHP script

    <?php
    $password="pass";
    exec("useradd user2");
    $volumesp = popen("passwd user2", "w");
    fputs($volumesp,$password."\n");
    fputs($volumesp,$password."\n");
    pclose($volumesp);
    ?>
    # php sample.php - gives sucessful output

    The password for the user "user2" is being created sucessfully.

    But I am unable to add a samba user using a similar script

    <?php
    $password="pass";
    $volumesp = popen("smbpasswd -a user1", "w");
    fputs($volumesp,$password."\n");
    fputs($volumesp,$password."\n");
    pclose($volumesp);
    ?>

    # php sample.php - I am have to enter the password 2 times like I do in
    command line.

    I am also facing the same problem with smbadduser instead of smbpasswd
    command. Infact these are the only commands I am facing problems executing
    in PHP scripts.

    I agree - this may not be the right list for this question - Pls help me in
    troubleshooting this problem or atlest help me guiding to the right list.

    Regards,
    Rajiv

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Espen Stefansen: "Re: Problem with NFS after updating util-linux"

    Relevant Pages

    • Re: Attempt to de-mystify AJAX
      ... created and populated by the PHP script. ... string is initialized in line 1 to the opening select tag. ...
      (comp.databases.pick)
    • Re: File permissions for a wiki-like site
      ... the content using PHP scripts. ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... The web user is used for things like ...
      (comp.lang.php)
    • Re: File permissions for a wiki-like site
      ... the content using PHP scripts. ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... The web user is used for things like ...
      (comp.lang.php)
    • Re: File permissions for a wiki-like site
      ... the content using PHP scripts. ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... The web user is used for things like ...
      (comp.lang.php)
    • Re: High Scores
      ... If you want to view High scores it returns Could Not load scores ... here is the PHP script ... Edit the game Flash file to point to this file on your server ... >> And the PHP script is here ...
      (alt.php)