Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!decwrl!sun-barr!newstop!texsun!playroom!playroom.Central.Sun.COM!cliffs From: cliffs@playroom.Central.Sun.COM (Clifford C. Skolnick) Newsgroups: comp.unix.internals Subject: Re: passwd Message-ID: <493@playroom.UUCP> Date: 1 Oct 90 14:49:44 GMT References: <24596@adm.BRL.MIL> <186@inews.intel.com> <195@inews.intel.com> Sender: news@playroom.UUCP Organization: Sun Microsystems, Inc. Rochester, NY Lines: 17 In article <24596@adm.BRL.MIL> ITMS400@indycms.iupui.edu ( Manjit Trehan) writes: > >Is there any way to have the adduser program set passwords from a >file. It seems to not use stdin to read the password, rather, >opens the tty device to read the password (??). Ok, we can fool the getpass(3) routine into reading standard input, unless you are on a System V machine which you can hope the program will handle intself (I doubt it). Write a small wrapper C program that will issue a TIOCNOTTY ioctl(2) on standard input. This way when getpass(3) will be unable to open /dev/tty and will punt to standard input. -- Cliff Skolnick - Technical Consultant cliffs@east.sun.com [I only work for Sun, I do not speak for them] "The floggings will continue until morale improves"