The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-30-2003
Registered User
 

Join Date: Jun 2003
Location: Colorado
Posts: 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  
Old 07-01-2003
s93366's Avatar
Registered User
 

Join Date: Apr 2002
Location: Sweden
Posts: 159
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
Karma's Avatar
Registered User
 

Join Date: Jun 2003
Location: Canada
Posts: 142
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
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0