RE: [PHP] Script permissions

From: Date: Fri, 15 Dec 2000 00:04:44 +0000
Subject: RE: [PHP] Script permissions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30418@lists.php.net to get a copy of this message
By the way. I didn't mention that I already have this script set up. I just need to be able to run it as root, as I said earlier. I'd like to refrain from running Apache as root at the same time. My main problem is knowing next to nothing about PHP and being on a deadline at the same time :) On Thu, 14 Dec 2000, Jeff Wyman wrote: > Yes that would work well, except that I need to send multiple lines of > input into Linux's passwd with root permissions :( > > I suppose if it's necessary I will go about compiling PHP in CGI. Or, say, > could I simply whack together a CGI script and embed PHP in it? Don't > think I can but what the hell! > > On Thu, 14 Dec 2000, Jason Cox wrote: > > > You could run a setuid program written in C or something to act as a > > "wrapper" using the system() function. I have one if you're interested. > > It > > works somewhat like the "su" unix utility except it allows you to run a > > single command as another user give a user/pass and then exit. For example: > > > > ssu -u username -p password -c 'useradd -d /dev/null -s /dev/null newuser' > > > > This type of thing could be used in the system() function. However, I would > > recommend running this as root because you would have to hard-code your root > > password. > > > > Jason > > > > -----Original Message----- > > From: Jeff Wyman [mailto:wysoft@wysoft.tzo.com] > > Sent: Thursday, December 14, 2000 4:48 PM > > To: Jason Cox > > Cc: php-general@lists.php.net > > Subject: RE: [PHP] Script permissions > > > > > > I'm writing a small PHP script to call useradd and passwd to create > > crippled users on a Linux (yuck) system. I'm simply testing it out at the > > moment, so it doesn't matter to me how sloppy the code is. Once I have the > > basic idea of how to do it, I'll redo it. > > > > Note: a few have told me to simply "use a webmin-type package." Well, I'm > > setting this up to allow users on the web to add a user account for > > themselves onto a web/mail server. The web server then serves out a > > web-based email application which uses the local SMTP and IMAP servers to > > shuffle mail around. No users will be permitted any sort of login besides > > this web-based system, as SMTP is a closed relay and the rest of the ports > > are firewalled. > > > > On Thu, 14 Dec 2000, Jason Cox wrote: > > > > > Yes, PHP can be compiled as a stand-alone cgi executable. As a module, I > > > don't think it's possible to have an individual apache process run as a > > > different user. What are you trying to accomplis? There might be another > > > way to do it. > > > > > > Jason > > > > > > -----Original Message----- > > > From: Jeff Wyman [mailto:wysoft@wysoft.tzo.com] > > > Sent: Thursday, December 14, 2000 4:39 PM > > > To: Jason Cox > > > Cc: php-general@lists.php.net > > > Subject: RE: [PHP] Script permissions > > > > > > > > > A module. I was not aware that PHP could be used with CGI. > > > > > > On Thu, 14 Dec 2000, Jason Cox wrote: > > > > > > > Are you running PHP as an apache module or as CGI? > > > > > > > > Jason > > > > > > > > > > > > _______________________________________________________ > > > Site Design, Hosting, and E-Commerce at www.webpipe.net > > > > > > > > > > > _______________________________________________________ > > Site Design, Hosting, and E-Commerce at www.webpipe.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#30418) next »