Kyle Burton on Mon, 4 Oct 1999 09:20:42 -0400 (EDT)


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

Re: [Plug] expect problem


What distribution are you running?  Do you have Unix 98 ptys set up on your
system?  Can you run the expect script at root?

I've encountered this problem on Suse 6.1, but not on Redhat.  I got around
it on the Suse system using a couple of fifos in the file system to redirect
stdin/stdout through the pipes so I could run the command like this:

[user@host dir]$ mkfifo x.in
[user@host dir]$ mkfifo x.out
[user@host dir]$ ftp < x.out 2>&1 |tee x.in > log.file &
[user@host dir]$ ./expect_script < x.in > x.out &
[user@host dir]$ tail -f log.file


or something like that...I forget exactly how I got it to work...if you
play around with the redirection enough, you should be able to work it out.

k

------------------------------------------------------------------------------
"Success covers a multitude of blunders." 
    -- George Bernard Shaw
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

On Sun, 3 Oct 1999, Greg Lopp wrote:

> There was a discussion of expect here a few weeks ago.  I finally get
> around to trying it out and I can't get past one simple problem :  it
> always fails on the 'spawn' command.
> 
> Whether executing as myself or as root, it invariably says :
> 
> spawn ftp
> The system has no more ptys.  Ask your system administrator to create
> more.
>     while executing
> "spawn ftp"
> 
> The Expcet FAQ (http://expect.nist.gov/FAQ.html) offers very little help
> 
> :
> 
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> 58.Why does Expect work as root, but say "out of ptys" when run as
> myself?
> 
>       Expect works fine as root, but when I run it as myself it says
> "out of ptys" (which I know isn't true).  Any ideas?
> 
>       Sounds like a misconfiguration problem on your system. For
> example, once I saw this on a
>       Digital system where the system administrator had decided to
> remove setuid from all programs
>       ("I heard that setuid is a security risk, right?"). On that
> particular system, Expect uses a system
>       library function that internally calls an external program chgpt
> which exists solely for the
>       purpose of managing ptys. Needless to say, it must be setuid.
> Unfortunately, the library function
>       doesn't do enough error checking, and there's no way for Expect to
> know that, so there's
>       nothing I can do to give a better diagnostic explaining how your
> system is misconfigured.
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
> It also has some stuff about configuring the devpts fs, but that was no
> help.  My concern is instead with the '' program instead....not only do
> I not have a copy of it, I've never heard of it.  I've done a number of
> web searches for the string "", but the only results are mirrors of the
> Expect FAQ, or in .de or .fi
> 
> Any ideas?
> 
> 
> _______________________________________________
> Plug maillist  -  Plug@lists.nothinbut.net
> http://lists.nothinbut.net/mail/listinfo/plug
> 


_______________________________________________
Plug maillist  -  Plug@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug