Adding users with PHP (pass php variables to Expect script)
Hi there, I could't find an answer already here so I've made a post, forgive me if the answer is here but I couldnt find it.
Ok so here goes, I have a php page that takes a username in( from textbox), i want to send that username thru to an Expect script The expect script will log in as root, add the user, do whatever else i decide, then switch out of root. heres what I've come up with so far... The first page, with the form that takes in the username Code:
<html> The username gets passed into this php file, and echoed back on the screen for confirmation, this part works fine Code:
<html> the username should be sent here, then added to the linux box, but this doesn't work Code:
#! /usr/bin/expect -f Can someone please help me solve this problem, I'm having little luck finding tutorials/solutions on the internet Thank you for your time J |
At a glance, you would need a space between adding.exp and $username
So change PHP Code:
PHP Code:
PHP Code:
|
All times are GMT -5. The time now is 01:38 AM. |