LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-06-2007, 03:03 AM   #1
Moozzie
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Rep: Reputation: 0
Question Allow apache to use the ' useradd' command


Hi all,

I have a Unix server (RedHat), I can create new users with the useradd command (as root), but apache cann't. How can I tell the programm useradd to allow apache/nobody to create new users?

Thank you
 
Old 06-06-2007, 03:34 AM   #2
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
hello Moozzie,
The useradd comand can be run/execute only by root user and not by anyone. If you elaborate your problem or where/why you need this, i can do my best.
 
Old 06-06-2007, 03:55 AM   #3
Moozzie
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
hello ZAMO
I want to create new users on my server, But... I don't want to do it myself. PHP needs to do that. I have a form and that I will send a the 'useradd' command. But PHP is not allowed to do that...
 
Old 06-06-2007, 04:01 AM   #4
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Rep: Reputation: 16
You can setuid useradd but this is too risky...

Try webmin maybe..
 
Old 06-06-2007, 04:13 AM   #5
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
yes ,
as scoban stated it is too risky to make apache as a user who can be able to add a user.because the PHP script is own by apache. As most hackers in this world use php script for hacking, it is risky to do this.
 
Old 06-06-2007, 04:16 AM   #6
Moozzie
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
oke but how does webmin do it? If he can do it save why can't I?
Of course i don't want that much as webmin, the only thing i want is creating users

Is it posible (and a good idee) to write a C script who is waiting on some empty port. and if i want to create a new user, i'll tell that to that port. So a C script can create it for me (with useradd)

Ty

Last edited by Moozzie; 06-06-2007 at 04:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
useradd command Linuxien Linux - General 2 11-14-2006 07:32 AM
useradd command Wolvastur Linux - Newbie 9 01-25-2005 10:01 AM
useradd command johnpayback Linux - General 4 08-13-2002 05:24 PM
useradd command johnpayback Linux - Newbie 5 08-13-2002 10:22 AM
useradd command allancondino Linux - General 5 04-27-2002 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:13 AM.

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