Wrox Programmer Forums
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 26th, 2003, 12:38 AM
Authorized User
Join Date: Jun 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to natmaster Send a message via AIM to natmaster Send a message via MSN to natmaster
Default system() login

i want to execute some commands on my web site via the system command (don't worry, you have to login with high level authorization, namely me, to be able to run the script) but to do so, i need to login to my shell acount, because of various access rights and such. so how would i do so? normall when i login to shell it automatically asks me for my username and password, but this is different, is there a command i have to use? like 'login' or something?

thanks in advance.

Aeon of Darkness MUD - Free Online Roleplaying Game
Old July 31st, 2003, 01:59 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts

Afaik, you can't write a PHP script that logs into a shell as someone else, executes commands in that shell, and logs out back to the original shell.

The only way I can think of is to create a new user group with the www user in it, and give execution rights to that group for your script. The problem there is, of course, that any PHP script running as the www user would have access to your files/directories.

Take care,


Similar Threads
Thread Thread Starter Forum Replies Last Post
Login system chroniclemaster1 ASP.NET 2.0 Professional 2 March 4th, 2008 09:34 PM
Multiple problems with Login system, GridView hindereduseless ASP.NET 2.0 Professional 0 May 3rd, 2006 01:13 AM
Authenticate login on same system hitu_patel_soft JSP Basics 0 April 20th, 2006 09:14 AM
login system problem arakay Beginning PHP 1 June 27th, 2005 09:15 AM
How to get system login and date Abhinav_jain_mca General .NET 2 August 26th, 2004 01:12 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.