Re: Root Commands
| From: | Adam Voigt | Date: | Thu, 20 Feb 2003 14:31:46 +0000 |
| Subject: | Re: Root Commands | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136362@lists.php.net to get a copy of this message | ||
Yeah, it's a bad idea, but he wants to be able to add email accounts to
the
system, and not have to use a database for his mail users. So there you
go.
On Thu, 2003-02-20 at 09:30, Jason Sheets wrote:
I would highly recommend against doing this, this would work but it
would open you up to allowing your webserver user/php to add any
user to
your system. This is beyond a bad idea.
Jason.
On Thu, 2003-02-20 at 06:46, Adam Voigt wrote:
> Check out "sudo", with man pages or what not, you use
> the command "visudo" to define who can run what commands
> as root. And then in your php, you just do:
>
> exec("sudo adduser");
>
> With whatever parameters you need to adduser.
>
> On Wed, 2003-02-19 at 18:37, Patrick Armour wrote:
>
> I am trying to use a form (password protected of course) that
will
> allow an administrator to add POP accounts to a linux box.
The
> problem that I seem to have is that the form is trying to give
the
> commands as user 'nobody' and they need to be given by either
root
> or a superuser.
>
> Is there any way to accomplish this? If somebody were to
point me
> in the direction of a tutorial on this subject I would really
> appreciate it.
>
> Sincerely,
> Patrick Armour
>
> www.greatplainsinternet.com
> --
> Adam Voigt (adam@cryptocomm.com)
> The Cryptocomm Group
> My GPG Key:
> http://64.238.252.49:8080/adam_at_cryptocomm.asc
--
Adam Voigt (adam@cryptocomm.com)
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc