[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem in output to a kinit process

Hi Herald,
I am trying to make a program which automates a Linux Server to become a 
Member Server of Windows AD. This is done through a web interface. The Web 
Interface CGI code is long, However, the User enters details such as 
Username, Password and windows Domain, KDC etc.
Everything is fine... I can create the krb5.conf file, as mentioned in the 
Samba-Howto. I can even get it a kerberos ticket manually. However when the 
part of my CGI code tries to automate the ticket requesting feature... I 
get an unusual situation where the kinit process keeps waiting for user 
input.. in my case the CGI program never sends the complete page, ie Error 
or success. Hence everything breaks. The Same Part of Code however works 
very well with RedHat, ie MIT kerberos library. I have come to know that 
kinit takes its input directly from tty, however I do not know how to 
implement that.

At 12:29 PM 9/1/2004, Harald Barth wrote:

> > > open (WTR, "| kinit Administrator\@IN.CAL 2> error.txt");
> > > print WTR "password\n";
> > > print WTR "\n";
> > > close WTR;
> > > ======
> > >
> > > 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.
> >
> > You have to take Perl Expect as kinit is reading the password directly
> > from the tty.
>Which was designed that way to make it more difficult to use kinit in
>a way which exposes the password. You might want to solve your problem
>differently (not with kinit). If you describe here what you want
>to do, someone might have a solution that fits better.