![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do i change to super user then revert back to ordinary user ,using shell script? | wrapster | Shell Programming and Scripting | 3 | 06-04-2008 04:11 AM |
| switching user from root to ordinary user | sasia | Shell Programming and Scripting | 3 | 01-25-2008 07:25 PM |
| Other than root user .Normal user is unable to create files | mallesh | UNIX for Advanced & Expert Users | 1 | 06-22-2005 09:18 AM |
| Limiting length of user in while creating user | Satya Mishra | AIX | 2 | 04-14-2005 11:40 PM |
| single user mode - user accounts passwords | orestis | UNIX for Dummies Questions & Answers | 2 | 03-09-2005 06:54 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#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?
|
| Forum Sponsor | ||
|
|
|
#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. <?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 Of course, the options for adduser vary per system... play with them and figure out what works! |
||||
| Google The UNIX and Linux Forums |