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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-31-2004, 04:28 AM
|
#1
|
Member
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86
Rep:
|
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
|
|
|
08-31-2004, 07:09 AM
|
#2
|
Member
Registered: Jan 2004
Location: NH
Distribution: Mandrake, Geentoo, Ubuntu
Posts: 105
Rep:
|
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
|
|
|
08-31-2004, 07:18 AM
|
#3
|
Member
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 09:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|