Solved

adduser

Posted on 1998-09-15
3
155 Views
Last Modified: 2010-03-05
Does anyone know if there is a Perl script available that allows you to add a new user on a Linux system.  What I would ideally like to do is be able to add a new user via a web interface.
0
Comment
Question by:bsufs
3 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1204853
Yes.
(but I wouldn't ordinarily expect a web interface to be given the neccesary privileges to run it)
0
 

Author Comment

by:bsufs
ID: 1204854
How can I obtain this script?
0
 
LVL 1

Accepted Solution

by:
stormerider earned 200 total points
ID: 1204855
Adduser under linux is a script interface to useradd. Take a look at the script, and then rewrite it under either perl or CGI. You're either going to have to set a special entry into apache to run that script as root, or run all scripts as root, or pass information from the cgi to another script because apache does NOT like suid cgi's (server error). Unless there is a way to tell apache not to do that...

Make TIGHT security on it. If you use something like cgi-lib.pl, make sure you add a line to s/\`//g and s/\;//g. Otherwise you'll have very unfriendly things done...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question