home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!dptg!rjf
- From: rjf@lincroftnj.ncr.com (51351[efw]-Robert Feddeler(MT4799)T343)
- Subject: Re: passwd
- Message-ID: <1993Jan8.203531.6430@lincroftnj.ncr.com>
- Organization: AT&T/NCR, Lincroft, NJ, USA
- References: <1ikbatINNgl8@matt.ksu.ksu.edu>
- Distribution: usa
- Date: Fri, 8 Jan 1993 20:35:31 GMT
- Lines: 17
-
- In article <1ikbatINNgl8@matt.ksu.ksu.edu> holland@matt.ksu.ksu.edu (Rich Holland) writes:
- >Does anyone know how to make passwd behave non-interactively? We've tried
- >(echo newpass ; echo newpass ) | passwd, but it wants the passwords to be
- >typed in from the keyboard. I need to do this in a script, to set up new
- >account passwords...
- >
- >--
-
- passwd(1) writes and reads(!) on stderr (file desc 2). Just because it can,
- I suppose. I didn't actually try it, but something like this might work:
-
-
- (echo newpass ; echo newpass ) | passwd 2<&0
-
-
- bob. | Heap big trouble in the land of plenty.
- Were these more than just my opinions, they would have cost a bit more.
-