Bug#333138: [Pkg-shadow-devel] Bug#333138: chfn behaves bogusly when either fd 0, 1 or 2 is not a tty

Christian Perrier bubulle at debian.org
Tue Oct 11 04:40:02 UTC 2005


Quoting Nicolas François (nicolas.francois at centraliens.net):
> Hello,
> 
> I don't think it is really a bug.
> 
> The chfn man page indicates that "If none of the options are selected,
> chfn operates in an interactive fashion, prompting the user with the
> current values for all of the fields."
> The "interactive fashion" means that it will hang and wait for the user's
> input.
> 
> If you intend to use chfn in a script, you should use the [-f full_name]
> [-r room_no] [-w work_ph] [-h home_ph] [-o other] options.


Funnily, stdin can still be used as input to chfn (and, I guess, chsh)
as I showed in my example. The output is a bit ugly because the
prompts are still sent to stdout, but it does the job.

I propose closing this bug report.






More information about the Pkg-shadow-devel mailing list