This is a discussion on required help for running a shell script from browser within the Shell scripting forums, part of the Development/Scripting category; I am having following shell script. How do I run this script from browser. Can anybody give me a code ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
I am having following shell script. How do I run this script from browser.
Can anybody give me a code for this script to run from browser My script is: #!/bin/sh TERM=vt100; export TERM clear echo " ADD USER " echo " ----------" USERID="" while [ "${USERID}" = "" ] do echo -n "Enter User-id: " read USERID done TICKETNO="" while [ "${TICKETNO}" = "" ] do echo -n "Enter Ticket No.: " read TICKETNO done LOCATION="" while [ "${LOCATION}" = "" ] do echo -n "Enter Location: " read LOCATION done USERNAME="" while [ "${USERNAME}" = "" ] do echo -n "Enter User Name: " read USERNAME done echo "Id = $USERID" echo "TicketNo = $TICKETNO" echo "Location = $LOCATION" echo "Name = $USERNAME" echo -n "Are the above values OK? (Y/N): " read ANS if [ "${ANS}" = "Y" ] then /usr/sbin/adduser -g users -c "$TICKETNO-$LOCATION-$USERNAME" $USERID passwd $USERID fi |
| Sponsored Links | ||
|
|
|
||||
|
You cannot run a shell script from web page. First, you need to configure web server as a cgi-bin.
Next use php,perl or shell script that will display html text box, verify input and then add the user using sudo. See old post: http://www.cyberciti.biz/nixcraft/fo...opic.php?t=405 If you need to manage server (user add, change password etc) using web interface I recommend to use webmin program http://www.webmin.com/
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell scripts required for students | roni | Shell scripting | 6 | 07-20-2007 07:21 PM |
| running command a root in shell scripts | chiku | Shell scripting | 1 | 07-17-2006 07:39 PM |
| running .sh script linux | jerry | Shell scripting | 1 | 06-17-2006 02:45 PM |
| Shell,perl plsql programmer required (get paid) | amitoverseas40 | Solaris/OpenSolaris | 0 | 08-13-2005 10:15 PM |
| Shell,perl plsql programmer required (get paid) | amitoverseas40 | Shell scripting | 0 | 08-13-2005 10:12 PM |