Solved

adduser

Posted on 1998-09-15
3
153 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do I grep for a specfic DNS record in a directory 3 45
compress files in RAR using perl 13 81
Perl modules on linux ec2 3 104
combine multiple lines 2 62
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

777 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