add user from web


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers add user from web
# 1  
Old 07-01-2003
add user from web

I am trying to figure out how to add a user from the web (w/ PHP or PERL): is it possible?
# 2  
Old 07-01-2003
Of course its possible! You can do it with cgi in perl, shell or php with a simple html form.

I would not reccommend doing it since you can compromise the security of your system if you dont know what you are doing.
# 3  
Old 10-01-2003
In PHP, you would:

make a form that sends the username and password... via POST, of course.

<?php

exec("adduser -u $HTTP_POST_VARS[user] -p $HTTP_POST_VARS[password]", $results);

?>

of course, it would be a good idea to use escapeshellcmd() (I forget the exact spelling, sorry - it's early and I haven't had any coffee), because a naughty user might semi-colon off your adduser command Smilie

Of course, the options for adduser vary per system... play with them and figure out what works!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

Visualizing MySQL Session : Web Server User Behavior at UNIX.com

Visualizing MySQL Session - Web Server User Behavior The video in this post shows unix.com forum user session information in a way that has never been visualized before. I plan to enrich this visualization significantly in the future - it's currently just a first beta. RWBeylgjOqs (0 Replies)
Discussion started by: Neo
0 Replies

2. Shell Programming and Scripting

Copy text from web page and add to file

I need help to make a script for Ubuntu to OSCam that copy the text on this website that only contains "C: ip port randomUSERNAME password" and want to exclude the text "C:" and replace the rest with the old in my test.server file. (line 22) device = ip,port (line 23) user =... (6 Replies)
Discussion started by: baxarn
6 Replies

3. Linux

Trouble setting up basic user authentication on apache2 web server

Hey guys! So I decided to set up some basic user authentication on my apache2 server, and I am running into some problems. I followed the documentation provided by apache on their website, but I cant create the password file for some reason. I did a little trouble shooting myself, and found... (40 Replies)
Discussion started by: LinuxIntern445
40 Replies

4. UNIX for Dummies Questions & Answers

How to switch the user before executing a shell script from web page??

hi, i want to execute a shell script as a different user. the flow is like this. there is a html web page from which i have to call a shell script. web server is apache. to call the shell script from html page, a perl script is required. so the html page calls the perl script and the perl... (2 Replies)
Discussion started by: Little
2 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. UNIX for Dummies Questions & Answers

Warning msg from .sh script to web user?

Hello out there, I got a script that stops and restarts a webapp. I would like to be able to send warning reminders to the webusers as a warning like 5 minutes before it happens. Can I do this an if so how? (1 Reply)
Discussion started by: vsekvsek
1 Replies

7. Shell Programming and Scripting

help pulling ${VARS} out of a web page user curl

Here is the code I have so far #!/bin/bash INFOF="/tmp/mac.info" curl --silent http://www.everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-2-duo-2.8-aluminum-17-mid-2009-unibody-specs.html "$INFOF" I want help putting these specs into a vars Standard Ram: value into $VAR1... (1 Reply)
Discussion started by: briandanielz
1 Replies
Login or Register to Ask a Question