Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!princeton!phoenix.Princeton.EDU!subbarao From: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) Newsgroups: comp.unix.admin Subject: Re: Bug in su (?) Message-ID: Date: 30 May 91 01:07:48 GMT References: <1086@eplunix.UUCP> Sender: news@idunno.Princeton.EDU Reply-To: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) Organization: American Chemical Society Lines: 51 In article <1086@eplunix.UUCP> mrn@eplunix.UUCP (Mark R. Nilsen) writes: >I hope this posting is relevent here. I do not regularly read this group. >I have encountered a problem when using su with rsh. This is what happens. > >I type from one of our vaxen: > > rsh earlobe su > >I get: > > Password: > >I start typing and my keystrokes are echoed!! > >If noone is looking over my shoulder and I type the correct password >I get stuck in a very strange state. I can do everything I want, >but I have no visible prompt. The environment variable says my Relax. There's no bug in su. The reason that you're seeing echoing is because there's no way to turn it off. when you say 'rsh foo su', the rsh process is not associated with a tty on machine foo, therefore when getpass() tries to ioctl() a tty, it can't find one, so things are echoed. As to the shell after that, since isatty(0) is not true, it assumes that it's not interactive and therefore does not print a prompt. (right, there's no need to print a prompt in the general case if input is not from a tty). If you wanted a prompt, all you have to say is 'rsh foo su -c "csh -i"', or whatever your favorite shell is. Realize now that you won't be able to interactively edit something via 'vi' or the likes. If you want a tty in the first place, you can have a kludge by saying say 'rsh foo pty -d su', if you have Dan Bernstein's pty program. This, however, is not a really clean approach, and if you want a darn tty in the first place, then you might as well rlogin to the machine, get a shell, then su from the shell. >"To skilled assembly language | Mark Nilsen. >programmers, the 8088 is perhaps the | >most wonderful processor ever | mrn%eplunix.UUCP@eddie.mit.edu >created, ..."-Dr Dobb's Journal, 3/91 | Nah. It's not CISCy enough. The M680*0 series is a lot more nicer. Gotta love that BFEXTU instruction! -Kartik -- internet% whoami subbarao@phoenix.Princeton.EDU -| Internet kartik@silvertone.Princeton.EDU (NeXT mail) SUBBARAO@PUCC.BITNET - Bitnet