LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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, 08: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, 08: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, 08: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, 08: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, 06: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:06 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 12:51 PM
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 04:08 PM
shell commands! krishlinux General 1 10-05-2003 05:47 AM
shell problems ? cant run Java commands RedHat123 Linux - General 2 07-16-2002 11:29 PM


All times are GMT -5. The time now is 09:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration