LinuxQuestions.org
Help answer threads with 0 replies.
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 08-31-2004, 03:28 AM   #1
saneax
Member
 
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
Problem in output to a process in perl


Hi All,
greetings.
I am trying to get a kerberos ticket with the help of a perl script, so that it is automated. The script works in Redhat however in Suse, I am encountering problem, where the kinit process waits for user input, however the requirement is that it should not wait as I am writing the password to STDIN of the process.
Here is my code, as I am quite new, I must not be doing the right thing here. ne help would be most thankfull.
======
#!/usr/bin/env perl
use warnings;



open (WTR, "| kinit Administrator\@IN.CAL 2> error.txt");
print WTR "password\n";
print WTR "\n";
close WTR;
======
regards


Saneax
 
Old 08-31-2004, 06:09 AM   #2
Linux_in_NH
Member
 
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105

Rep: Reputation: 15
after the open statement, you should check to see if there are any errors returned before you try wring the data. My guess is that you have some sorta permissions problem and the WTR file handle is invalid, resulting in the output going to STDOUT
 
Old 08-31-2004, 06:18 AM   #3
saneax
Member
 
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Original Poster
Rep: Reputation: 15
Hi,
Thanx for point it out, however its very specific to the way heimdal kerberos library behaves... The same script works fine in RedHat, only in Suse it gives a problem, there are no errors

ie
echo "freevision" | kinit Administrator@IN.CAL

this should work, but it does not!

regards
 
  


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
Regaining output from a background process the_holysmoke Linux - Newbie 4 03-11-2011 06:48 PM
How to process ping output with sed? Griffon26 Linux - General 5 08-30-2009 04:16 PM
iptables OUTPUT rules: DROP by process (PID)? gregory76 Linux - Security 6 07-11-2003 04:28 PM
Redirecting process output to shell mhelles Linux - Newbie 1 04-30-2003 09:30 AM
perl: process.. export Programming 1 05-22-2002 07:15 AM


All times are GMT -5. The time now is 04:19 PM.

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