LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2003, 07:18 PM   #1
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Rep: Reputation: 15
PHP to run Shell commands


ok this is a very simple question...

Is it possibe for a PHP 2 run a shell script...

So say...

if someone goes 2 adduser.php?user=bob&pass=bob1

it will run


useradd -g users-s /bin/bash -d /home/bob-m -c 'BOB' bob

passwd bob
enterpassword: bob1
re-enter: bob1

get what i mean?

Thanks for any help

(if ya wanna know why i want this... i want 2 set up a basic web interface for my webserver)
 
Old 06-03-2003, 07:24 PM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Erm, I think you want Webmin.
 
Old 06-03-2003, 07:25 PM   #3
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
nah... i want 2 write my own...

and i found what i was looking for

shell_exec () << and it works 2 !
 
Old 06-03-2003, 07:31 PM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Just thinking of security that's all. I'm guessing Webmin is more secure and bugtested.
 
Old 06-04-2003, 05:39 AM   #5
Gear_freak2000
Member
 
Registered: Jun 2003
Posts: 90

Original Poster
Rep: Reputation: 15
WOW! that webmin looks very good! im just installing it now!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[PHP] Sending shell commands from PHP pEeDy Programming 4 11-04-2005 08:06 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM
how can i run a shell scripts (or a number of commands )when a user logs in to a linu rddreamz Programming 4 05-20-2004 03:08 PM
shell commands! krishlinux General 1 10-05-2003 04:47 AM
shell problems ? cant run Java commands RedHat123 Linux - General 2 07-16-2002 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration