LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-28-2012, 07:41 AM   #1
linux833
Member
 
Registered: Jul 2011
Posts: 40

Rep: Reputation: Disabled
Apache to query tac_plus


Dear friends,

is it possible to quiery the tac_pwd from web page through apache to let user input his password then user could send it to me as encrypted by mail or what ever.

currently i should open the terminal and query tac_pwd manually in front of user.

apache already running on my server and configured to view log files.

my system is ubuntu 10.04.

thanks alot.


linux833
 
Old 07-28-2012, 02:56 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,135

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by linux833 View Post
Dear friends,
is it possible to quiery the tac_pwd from web page through apache to let user input his password then user could send it to me as encrypted by mail or what ever. currently i should open the terminal and query tac_pwd manually in front of user. apache already running on my server and configured to view log files.

my system is ubuntu 10.04.
Not sure what you're looking to do, since it's not very clear. How would you want the user to send it to you, via email? What are the "or whatever" options you have? The tac_pwd command, from what I can tell, is a command-line utility. You can easily write a web page using PHP to take input from a user, run any system utility, and output the results to the screen.

So, the answer to your question about whether it's possible to call tac_pwd from a webpage is "yes, it is possible". You would do it by writing a PHP page.
 
Old 07-29-2012, 02:35 AM   #3
linux833
Member
 
Registered: Jul 2011
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello TB0ne,
thanks alot for your reply, sorry if i was not clear. it's as simple you summarize, i need to execute an application from web so users could
open the page and get application executed then (Manually will send the password via email.


i'm new to programming language, could you please help me to write this script and lead me to where to place it.

i would appreciate any help.

linux883
 
Old 07-29-2012, 09:05 AM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,135

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by linux833 View Post
Hello TB0ne,
thanks alot for your reply, sorry if i was not clear. it's as simple you summarize, i need to execute an application from web so users could open the page and get application executed then (Manually will send the password via email.

i'm new to programming language, could you please help me to write this script and lead me to where to place it.
First start by looking up one of the many, easily-found PHP tutorials you can find on Google. This is from the PHP website, complete with an example:
http://php.net/manual/en/function.system.php

It performs the 'ls' command, and puts the results on the screen. Checking Google is always a good first step.

Where you put it, is up to you...and that will depend on how you set up your web server. You can place it in your webserver documentroot, but without knowing how you have it set up, we can't say.
 
Old 07-30-2012, 02:25 PM   #5
linux833
Member
 
Registered: Jul 2011
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello TB0ne,

thanks for your continues support,
actually the examples i found on the internet and share by my friends most about php script that will return output of
some commands, my case is different i need the php to to first read the execute the application internally within the server and output
the result.

it's like that
1-user will open the php link.
2-php will invoke the application on the server.
3-the application it self will generate read and required user input.
4-php will request read from user.
5-send read back to server application.
6-application will generate the output and php will echo it back to user.
----------------------------------------------------------------------
User:~$ telnet x.x.x.x
Trying x.x.x.x...
Connected to x.x.x.x.


AAA:~$ tac_pwd ---> user excute the application
Password to be encrypted: password -> application request input.
y/d6sWyZXc5NU -> application echo output.
AAA:~$


i know it's kind of hedeck and thanks for your help.

linux833
 
Old 07-30-2012, 02:43 PM   #6
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,135

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by linux833 View Post
Hello TB0ne,
thanks for your continues support,
actually the examples i found on the internet and share by my friends most about php script that will return output of
some commands, my case is different i need the php to to first read the execute the application internally within the server and output
the result.
No, it's NO different at all. Running one command and returning the values works the same for ANY command you run.
Quote:
it's like that
1-user will open the php link.
2-php will invoke the application on the server.
3-the application it self will generate read and required user input.
4-php will request read from user.
5-send read back to server application.
6-application will generate the output and php will echo it back to user.
----------------------------------------------------------------------
User:~$ telnet x.x.x.x
Trying x.x.x.x...
Connected to x.x.x.x.

AAA:~$ tac_pwd ---> user excute the application
Password to be encrypted: password -> application request input.
y/d6sWyZXc5NU -> application echo output.
AAA:~$
I would not use telnet for ANYTHING...you do realize that you'll be transmitting a user ID/password in clear text, not only over a web browser, but over the network too? Use SSH, and set that user up to do passwordless-logins, so you'll be able to run:
Code:
ssh user@server "tac_pwd"
on one line, without a password. But if you have the tac_pwd command on the server where your web page is, you don't even have to log in over the network...just run the command.
 
Old 07-30-2012, 02:52 PM   #7
linux833
Member
 
Registered: Jul 2011
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello TB0ne,

again sorry for unclear example, this telnet just to show exactly what i need to be done by php.
i'm not using telnet for management.

my case is that this application reside on the server, i need the php to act on the middle of the user and server tac_pwd application.

i need the php to excute the tac_pwd which will prompt user for password to be encrypted then it will pass the input request to user.
then php will send back the user input to tac_pwd to generate the needed output.


the problem when i use the php directly to excute the command it will work but will generate it's own password without user input.

could you please help on this please.


linux833.
 
Old 07-30-2012, 06:05 PM   #8
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,135

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by linux833 View Post
Hello TB0ne,
again sorry for unclear example, this telnet just to show exactly what i need to be done by php. i'm not using telnet for management.

my case is that this application reside on the server, i need the php to act on the middle of the user and server tac_pwd application. i need the php to excute the tac_pwd which will prompt user for password to be encrypted then it will pass the input request to user. then php will send back the user input to tac_pwd to generate the needed output.

the problem when i use the php directly to excute the command it will work but will generate it's own password without user input.
Again, I will suggest you start by looking up some VERY easily found PHP tutorials.
http://www.simplemachines.org/commun...p?topic=1285.0

Like I said in my first reply, write a web page to take input from the user, then pass that input to the command. Before we can help with anything, you will need to write some code for us to help you WITH.
 
  


Reply

Tags
apache, tac


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
[SOLVED] A i-think-a-newbie query in apache-httpd ajaygarg Linux - Server 2 03-25-2012 12:03 PM
An Apache related query saagar Linux - Newbie 1 03-25-2011 02:23 AM
tac_plus, enable issue!!! pvandyk2005 Slackware 0 08-15-2008 03:33 PM
Apache Virtual Host query Atif_Khan Linux - Server 4 01-16-2007 05:28 AM
tac_plus & PAM mambolim Linux - Networking 0 11-30-2006 12:47 AM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
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