RE: [PHP] System() works on /usr/sbin commands

2003-07-31 Thread Daevid Vincent
Add an entry to /etc/sudoers like so:

nobody  ALL=NOPASSWD: /bin/date


Daevid Vincent
http://daevid.com
 

> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 31, 2003 3:02 AM
> To: tirumal b
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] System() works on /usr/sbin commands
> 
> 
> Check out sudo (man sudo), but you must be carefull.
> 
> tirumal b wrote:
> 
> > hello,
> > 
> >   yes the /usr/sbin commands require root permissions
> > but is there any way to run these commands using
> > system() through suid or something.please let me know
> > 
> > Thank you
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder.yahoo.com
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] System() works on /usr/sbin commands

2003-07-31 Thread Marek Kilimajer
Check out sudo (man sudo), but you must be carefull.

tirumal b wrote:

hello,

  yes the /usr/sbin commands require root permissions
but is there any way to run these commands using
system() through suid or something.please let me know
Thank you

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] System() works on /usr/sbin commands

2003-07-30 Thread Curt Zirzow
* Thus wrote tirumal b ([EMAIL PROTECTED]):
> hello,
> 
>   yes the /usr/sbin commands require root permissions
> but is there any way to run these commands using
> system() through suid or something.please let me know

I would seriously not recomend not to suid the script. The
/usr/sbin/* files require root for a reason.

Your best choice is:

> su
# php file.php
# exit


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] System() works on /usr/sbin commands

2003-07-30 Thread tirumal b
hello,

  yes the /usr/sbin commands require root permissions
but is there any way to run these commands using
system() through suid or something.please let me know

Thank you

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] System() works on /usr/sbin commands

2003-07-30 Thread Evan Nemerson
You usually need to be root to execute /usr/sbin/*

check the permissions of the file you're trying to execute.



On Wednesday 30 July 2003 11:13 pm, tirumal b wrote:
> hello,
>
>   i was using system function to invoke useradd
> command but it doesn't work. well it works for all the
> commands but not those in /usr/sbin. why is it so.
>
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] System() works on /usr/sbin commands

2003-07-30 Thread Adrian
afaik requires useradd like the other sbin stuff root rights - and php
doesn't run as root


> hello,

>   i was using system function to invoke useradd
> command but it doesn't work. well it works for all the
> commands but not those in /usr/sbin. why is it so. 

> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com



-- 
Adrian
mailto:[EMAIL PROTECTED]
www: http://www.planetcoding.net
www: http://www.webskyline.de



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] System() works on /usr/sbin commands

2003-07-30 Thread tirumal b
hello,

  i was using system function to invoke useradd
command but it doesn't work. well it works for all the
commands but not those in /usr/sbin. why is it so. 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php