?
Solved

access to OS from website

Posted on 2005-03-10
8
Medium Priority
?
217 Views
Last Modified: 2012-05-05
RH9 running apahce 2 and  PHP4.

Is it possible for the website on this box to restart a process (sendmail)? if so how is it done?

Purpose: I wrote an application in php that has alot of email notifications. My clients, for whatever reason, requested that they have the ability in the administration to change the sendmail configuration. This would of course require the sendmail to be restarted so the changes take effect.
0
Comment
Question by:whozie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 13512634
Could it be done? Yes, but it would almost certainly be a bad idea and I can't think of any reason that it should be necessary if Sendmail was properly set up. What reasons are your clients giving for needing this?
0
 
LVL 2

Author Comment

by:whozie
ID: 13512656
Reasons, dont know, here is the actual request:

"We need to be able to access the smtp mail config from setup."

In the end I'll probaby just give them simple instructions to access the files and edit with pico or something. But i'd still appreciate a solution just incase they are stubborn....its their money /shrug.
0
 
LVL 2

Author Comment

by:whozie
ID: 13512665
Also, its a linux machine thats on an exchange network, the mail is sending fine to the mail server now and I dont know why that would ever change...but apparently it will.
0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 
LVL 40

Accepted Solution

by:
jlevie earned 600 total points
ID: 13512700
If you could pin them down on exactly what they'd want to be able to change it wouldn't be that difficult to create a web interface for simple changes. I presume that you are already aquainted with what's in a sendmail.mc and you can probably see that a generic interface to the config would be pretty difficult to do in a safe manner.
0
 
LVL 2

Author Comment

by:whozie
ID: 13512729
Yeah that would be difficult...because I have it setup with SMART_HOST and thats in the sendmail.mc. And the smtp_path is in php.ini so no help there. I probably should of thought this through before I even posted =P Maybe I'll just make a page with instructions on how to use command prompt and pico! woohoo.
0
 

Expert Comment

by:Spurgeon
ID: 13515928
try to make a cronjob of it. so it restarts in a certain amount of time...
edit > /etc/crontab
0
 
LVL 12

Assisted Solution

by:mburdick
mburdick earned 400 total points
ID: 13524695
"Hi. I'd like to be able to completely trash the configuration of your server from a web page. And, I'm still going to hold you responsible for anything I break."

Bad idea.

JLevie has the right idea - find out what they are looking to do. Then, you can devise a way to give them what they *need*, as opposed to what they *asked for*. Ask them what they need access to the configuration, what they need to change, what they need to change it to, and WHY. Harp on the WHY.

Chances are, they either really don't need to change anything at all (you could just set up all the components in advance), or they're looking to do things that they shouldn't be doing anyhow (and you shouldn't let them).

It almost sounds like they want the ability to change how/when they receive notifications? That's something that can be controlled outside of sendmail...
0
 
LVL 2

Author Comment

by:whozie
ID: 13525183
Apparently they change the IP of their email server frequently, when updating....I have no idea why. They said something to the effect "its easier during the transition to use a new IP"..i'm not a networking person so I'm not asking questions. They are savy enough with complex config files and command prompt to edit it with pico...so I'll give them instructions and a very straight forward disclaimer.

Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question