LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2005, 02:09 PM   #1
paintcheck200
Member
 
Registered: Sep 2003
Location: Michigan
Distribution: Gentoo, Knoppix
Posts: 69

Rep: Reputation: 15
allow apache certian commands


How would I go about allowing apache to execute a command say like useradd?
 
Old 03-15-2005, 02:59 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Apache doesn't execute commands. (Well, not in the way I think you're looking for.) Presumably, you want a website to add users. You'll need to build yourself a CGI interface, be it PHP/PERL/C, whatever. Then from there you can add users.
 
Old 03-15-2005, 03:12 PM   #3
paintcheck200
Member
 
Registered: Sep 2003
Location: Michigan
Distribution: Gentoo, Knoppix
Posts: 69

Original Poster
Rep: Reputation: 15
well, I've made a php script to do the command, but doesn't apache need permisions to run the command?

Also, does the script need to be in cgi-bin for some wierd reason?

Last edited by paintcheck200; 03-15-2005 at 03:15 PM.
 
Old 03-15-2005, 03:41 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
PHP scripts do not need to be in any particular directory. The user apache runs as (generally apache, httpd, or nobody) must be able to add the user. This can introduce some interesting security holes, and is generally discouraged. One possibility is a hardlink to the adduser command that is setuid, owned by root, and has the group of apache. Permissions should be 750. Again, this is not neccessarily a secure practice, and you should look into something slightly more sophisticated.
 
Old 03-15-2005, 03:45 PM   #5
paintcheck200
Member
 
Registered: Sep 2003
Location: Michigan
Distribution: Gentoo, Knoppix
Posts: 69

Original Poster
Rep: Reputation: 15
hmm..., well the deal is I need to authenticate to ftp for a certian reason, and I would like to somewhat automate account creation throught a web interface. Right now I'm using vsftp, but maybe I should switch to something else that allows ftp accounts other thens system accounts, maybe proftpd.

allowing localhost ftp only- perl authenticates to it - netreg ;-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Bash Commands From Apache windisch Linux - Software 14 08-17-2005 03:02 PM
DVD Video skips in certian players niztec Linux - General 0 08-08-2005 02:32 PM
how to make X use certian refresh rate? djc Linux - Newbie 12 03-14-2005 06:53 AM
Konqueror not displaying certian sites, MDK 10 webgovernor Linux - Newbie 2 06-25-2004 10:40 PM
Sendmail hangs when sending to certian domains Brian_TII Linux - Software 0 09-27-2001 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration