jhell a écrit :
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 Nov
21 15:48:17 UTC 2009
r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
I suppose this is a getpass() problem ?
This is intended operation as su(1) may not always be affiliated with a
TTY. This leaves it open for a script to chat with much like what samba
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
--
mailto:cyrille.lefevre-li...@laposte.net
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"