RE: [PHP] adding unix account via system command

2002-09-20 Thread Dan Hardiker
!!!WARNING - WARNING - WARNING - WARNING - WARNING!!! This will mean ANYONE can run this program AS ROOT. Read up on SUID. !!!WARNING - WARNING - WARNING - WARNING - WARNING!!! > Make yourfile.c and put this in: > > main(argc,argv) > int argc; > char **argv; > { > execv("/your/program/here"

RE: [PHP] adding unix account via system command

2002-09-20 Thread Jesse Cablek
tim tom scribbled; > > Dear Marek, > Where do find that? I am no C programmer. > > -- > tim > > --- Marek Kilimajer <[EMAIL PROTECTED]> wrote: >> It's a shell script, and your shell drops root privileges. Use a >> shell that doesn't or use a C-wraper. >> Make yourfi

Re: [PHP] adding unix account via system command

2002-09-19 Thread tim tom
Dear Marek, Where do find that? I am no C programmer. -- tim --- Marek Kilimajer <[EMAIL PROTECTED]> wrote: > It's a shell script, and your shell drops root privileges. Use a shell > that doesn't or use a C-wraper. > > tim tom wrote: > > >Dear Pete, > >Yes, apache runs as nobody. But I have s

Re: [PHP] adding unix account via system command

2002-09-18 Thread Henrik Hudson
Personally, running a script directly from a website to add users is asking for security trouble.. I would have it write a "adduser" request to a file and then have a cron job parse that file everyt 5, 10 or 30 minutes or something looking for new users to add. This gets you around the SUID p

Re: [PHP] adding unix account via system command

2002-09-18 Thread Marek Kilimajer
It's a shell script, and your shell drops root privileges. Use a shell that doesn't or use a C-wraper. tim tom wrote: >Dear Pete, >Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't that be sufficient ? > >-- >tim > >--- Peter Houchin <[EMAIL PROTECTED]> wrote: > > >>you need to m

RE: [PHP] adding unix account via system command

2002-09-17 Thread Peter Houchin
12:14 PM > To: Peter Houchin; [EMAIL PROTECTED] > Subject: RE: [PHP] adding unix account via system command > > > Dear Pete, > Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't > that be sufficient ? > > -- > tim > > --- Peter Houchin <[EMAIL

RE: [PHP] adding unix account via system command

2002-09-17 Thread tim tom
Dear Pete, Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't that be sufficient ? -- tim --- Peter Houchin <[EMAIL PROTECTED]> wrote: > you need to make sure that the web has permission to use that file .. my > guess is it don't have permission hence why you can run add.sh from the

RE: [PHP] adding unix account via system command

2002-09-17 Thread Peter Houchin
Sent: Wednesday, 18 September 2002 10:56 AM > To: [EMAIL PROTECTED] > Subject: [PHP] adding unix account via system command > > > php4.2.3 apache mod > linux rh7.2 > --- > > I am trying to add unix system account user via a simple php and > she

[PHP] adding unix account via system command

2002-09-17 Thread tim tom
php4.2.3 apache mod linux rh7.2 --- I am trying to add unix system account user via a simple php and shell script when i ran add.php on my browser, i get 254 user creation fail I created my add.sh file in /usr/bin and I have setuid it: -rwsr-xr-x1 root devel 21