passwd

Clifford C. Skolnick cliffs at playroom.Central.Sun.COM
Tue Oct 2 00:49:44 AEST 1990


In article <24596 at adm.BRL.MIL> ITMS400 at 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 at east.sun.com
           [I only work for Sun, I do not speak for them]

         "The floggings will continue until morale improves"



More information about the Comp.unix.internals mailing list