Solved

adduser

Posted on 1998-09-15
3
152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now