Solved

adduser

Posted on 1998-09-15
3
151 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
Comment Utility
Yes.
(but I wouldn't ordinarily expect a web interface to be given the neccesary privileges to run it)
0
 

Author Comment

by:bsufs
Comment Utility
How can I obtain this script?
0
 
LVL 1

Accepted Solution

by:
stormerider earned 200 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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

9 Experts available now in Live!

Get 1:1 Help Now