Date: Mon, 25 Jan 2010 10:41:35 +0100 From: Cyrille Lefevre <cyrille.lefevre-lists@laposte.net> To: jhell <jhell@DataIX.net> Cc: freebsd-stable@freebsd.org, Glen Barber <glen.j.barber@gmail.com> Subject: Re: su password prompt ti stdout instead of /dev/tty Message-ID: <4B5D674F.9070903@laposte.net> In-Reply-To: <alpine.BSF.2.00.1001242243460.72774@pragry.qngnvk.ybpny> References: <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net> <alpine.BSF.2.00.1001242243460.72774@pragry.qngnvk.ybpny>
next in thread | previous in thread | raw e-mail | index | archive | help
jhell a =E9crit : > On Sun, 24 Jan 2010 21:57, glen.j.barber@ wrote: >> Cyrille Lefevre wrote: >>> >>> su password prompt is displayed to *stdout* instead of */dev/tty*. >>> >>> # su user >>> $ su root -c date > /tmp/date 2>&1 >>> (nothing displayed) >>> $ cat /tmp/date >>> Password:su: Sorry >>> $ uname -a >>> FreeBSD freebsd8.my.domain 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat No= v >>> 21 15:48:17 UTC 2009 >>> root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >>> >>> I suppose this is a getpass() problem ? >>> >=20 > This is intended operation as su(1) may not always be affiliated with a= =20 > TTY. This leaves it open for a script to chat with much like what samba= =20 > does with its passwd chat mechanism. well, all other oses (netbsd, openbsd, ubuntu at least) don't do it this = way, they all password prompt to /dev/tty instead of stdout. freebsd is the only one which prompt to stdout. Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B5D674F.9070903>