este es int 15.php
Código:
Este es el que hace la ejecucion<html> <head> </head> <body bgcolor="COCOCO", text="000000", vlink="FF0000"> <form method="post" action="int24.php"> <br> <br> <center> Ingrese el nombre del usuario a agregar :</center> <br> <center><input type="text" name="usuario"></center> <br> <center> Ingrese el nombre del grupo al que va a ser agregado: </center> <br> <center><input type="text" name="grupo"></center> <br> <center><input type="submit" value="enviar datos"></center> <br> <center><a href= "int2.php"> Volver</a></center> <br> </form> </body> </html>
int24.php
Código:
nuevamente gracias <html> <head> </head> <body bgcolor="COCOCO", text="000000", vlink="FF0000"> <br> <br> <?php if (isset($_POST['usuario']['grupo'])){ $user = $_POST[usuario]; $grupo = $_POST[grupo]; exec("sudo /usr/bin/gpasswd -a $user $grupo",$salida, $salida1); foreach($salida as $linea){ echo "$linea"; } foreach($salida1 as $linea1){ echo "$linea1"; } } echo "<center>EL USUARIO <blink><b>$user</b></blink> HA SIDO AGREGADO AL GRUPO <blink><b>$grupo</b></blink> SATISFACTORIAMENTE"</center>; ?> <br> <br> </body> </html>