[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shell Script on Debian



On Fri, Jun 27, 2008 at 11:45:45AM +0700, Phuong Phan Thi Bach wrote:
> Hello,
> The  "passwd" command expects to read the new password only from the
> console, How to it read the new password only from a file.  I create a file
> (Ex: test file )
> 
> test file
> 123456
> 123456
> After, I use: "*passwd < test*" (shell on Debian is sh)
> But it always error: "Enter new UNIX password: Retype new UNIX password:
> Sorry, passwords do not match"
> Please, could you help me.
> Best regards,
> Phuong

Use chpasswd, it supports batch processing.


Regards: David Weinehall
-- 
 /) David Weinehall <tao@debian.org> /) Rime on my window           (\
//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   //  Diamond-white roses of fire //
\)  http://www.acc.umu.se/~tao/    (/   Beautiful hoar-frost       (/


Reply to: