LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-01-2004, 03:22 AM   #1
taqs
LQ Newbie
 
Registered: Aug 2004
Location: Lahore,Pakistan
Posts: 5

Rep: Reputation: 0
How to run php as root user ???


I want to create a linux user programatically through php.
For that i need to run my httpd or apache process with root user previlages. Can any one tell me how can i accomplish this task?
 
Old 09-01-2004, 04:56 AM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
A better way would be to simply run the adduser command as root and then revoke your root status once that command completes. Running apache as root is a bad idea and I think might even be hardcoded as not possible. Look into sudo and su -c.
 
Old 09-01-2004, 06:11 AM   #3
gizmo_thunder
Member
 
Registered: Apr 2004
Posts: 101

Rep: Reputation: 15
there must be a pam for php which helps you provide the root password and execute
some commands in root mode. may be you should try that.
 
  


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
Run PHP shell_exec as root maneeshsethi Linux - General 5 12-30-2008 08:25 AM
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 08:54 AM
PHP HOWTO : Run script as root guideweb Linux - Software 3 08-23-2004 12:38 AM
help getting pptp-php-gtk.php to run as root mrtwice Linux - Software 0 11-21-2003 01:49 PM
Is their a way to run a command as root..or another user.. in php BaerRS Programming 2 04-25-2002 03:38 PM


All times are GMT -5. The time now is 03:47 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration