add user from web

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers add user from web
# 1  
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  
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  
In PHP, you would:

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


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!

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #297
Difficulty: Easy
Linux Mint can be booted and run from a USB flash drive on any modern computer capable of booting from a USB drive.
True or False?

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

Visualizing MySQL Session : Web Server User Behavior at

Visualizing MySQL Session Web Server User Behavior The video in this post shows 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/" curl --silent "$INFOF" I want help putting these specs into a vars Standard Ram: value into $VAR1... (1 Reply)
Discussion started by: briandanielz
1 Replies

Featured Tech Videos