Creating a web based id request form


 
Thread Tools Search this Thread
Top Forums Programming Creating a web based id request form
# 1  
Old 04-14-2011
Creating a web based id request form

Please pardon my ignorance, but I need to create a web-based form which can be used to request access to the unix servers in our environment. It just needs to have input fields for basic info (name, dept., etc.), and perhaps a drop-down box with the names of the servers. The form will be submitted to someone who is authorized to approve the id. I haven't any idea how to go about this. Can you point me in a general direction (i.e., which program to use to create it?).
# 2  
Old 04-14-2011
Well, the form itself is just a webpage. If it's static, you could make it totally separate -- just pure HTML. It would call a CGI script, which you could write in a language you know. (What languages DO you know?)

Here's a simple introduction to forms, and a little example:

Code:
<html>
<form method='post' action="/cgi-bin/my-handler.sh">
        <input type='text' name='value'>
        <input type='submit'>
</form></html>

Code:
#!/bin/sh
# my-handler.sh
# doesn't have to be a shell script, you can write in whatever languages
# are available on your server...

# Every CGI script needs to start its output at least with a header saying
# what type of data it is, followed by a blank line.
echo "Content-type: text/plain"
echo
echo "You POSTed the following data:"

# Data will come into stdin as strings like var=value&var2=value2
# tr will read everything from stdin and print it to stdout, converting &
# to \n as it goes, printing them to the client's browser.
tr '&' '\n'

echo
# The server sets a bunch of different variables about itself, the client,
# the page being requested, etc.  'env' prints absolutely everything.
echo "The server provided the following variables:"
env

exit 0

The script goes in your webserver's cgi-bin directory (or your own private cgi-bin directory if you have one). If you can get that page working with that CGI script you can work up from there...
# 3  
Old 04-14-2011
THANKS so much for your help. At least I have a starting point....:-)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies

2. UNIX for Beginners Questions & Answers

How to use cURL to download web page with authentification (form)?

Hello, I'm new in the forum and really beginer, and also sorry form my bad english. I use linux and want to create little program to download automaticaly some pdf (invoices) and put in a folder of my computer. I learn how to do and programme with ubuntu but the program will be implemented... (1 Reply)
Discussion started by: MarcelOrMittal
1 Replies

3. Linux

Apache vhost - debug web request

Hello all, I have several vhost and not sure which vhost is serving the requests to my url http://www.mydomain.tld i have ssh access to the web server is there a way e.g curl to know exactly which vhost served the request. one of my friend suggested logs but i want to find another... (4 Replies)
Discussion started by: coolatt
4 Replies

4. OS X (Apple)

Web Request log

Hey all, I would like to track what applications are requesting access at the unix level. is there a log or a way to capture all network access requests? Not with applications. (1 Reply)
Discussion started by: Phorn
1 Replies

5. Solaris

Java web console Vs Web-Based Enterprise Management(WBEM)

Java web console Vs Web-Based Enterprise Management(WBEM) 1. I like to understand the difference in purpose of using java web console and Web-Based Enterprise Management (WBEM) 2. As per CIS benchmark, both of them has to be disabled when not used for increased security. Solaris admin(s) -... (0 Replies)
Discussion started by: cyberidude
0 Replies

6. Shell Programming and Scripting

Pass values from web form to shell script

Hi, is it possible to pass more values from web form like textbox to shell script and if yes,how to do that.:confused::confused::confused: (2 Replies)
Discussion started by: tdev457
2 Replies

7. Cybersecurity

configure apache to accept request form specific IP

Hi, What should I change in the httpd.conf so that the apache will accept request from page from specific IP and deny all the rest IP. I am reading the document of the apache but it is very long (700 pages) and I searched but I could not find something about this. So if someone can explain... (0 Replies)
Discussion started by: programAngel
0 Replies

8. Shell Programming and Scripting

Filling out Web Form from Script

I am trying to fill out a web form from within a script I am writing. I think that I should be using curl to do this, but I'm not really sure. The form has username and password fields and a submit button. I want to be able to log in from the command line. Html from the site: <h5... (2 Replies)
Discussion started by: vockleya
2 Replies

9. Shell Programming and Scripting

Transfer files with web based form by date

Not sure how I should approach this one. I have server X and Server Y. X is a collector. All files are seperated by hour. Y is used strictly for analysis. I do not always need all files from X. Sometimes other people use Y for analysis and do not always know how to transfer the files from... (3 Replies)
Discussion started by: mrlayance
3 Replies
Login or Register to Ask a Question