passwd from stdin

Hinko Kocevar hinko.kocevar at cetrtapot.si
Tue Nov 25 11:58:24 UTC 2008


Rabbul Nawaz wrote:
> Hello, We use busybox(Version 1.01) for DeepOfix Mail Server 
> http://code.deeproot.in/deepofix . I have a requirement in which the passwd 
> command of the busybox should read the passwords from a stdin(file), instead 
> of being manually typed. In the GNU/Linux systems, just by giving the 
> following command it works,
> passwd < input-file
> 
> The <input-file> will have the password saved in it, like below.
> Root123
> Root123
> 
> When I execute the following command in the busybox environment,
> 
> passwd < input-file
> 
> I get the message stating:
> passwd: The password for root is unchanged.
> 
> The above error is not just for root user, but for any user.
> 
> I am unable to find, how to make passwd cmd to accept input from a file. Can 
> someone please let me know, how this can be done. 
> 

I haven't found the solution few months ago either, but the 'chpasswd' applet is for this.

HTH,
Hinko

-- 
Hinko Kočevar, OSS developer
ČETRTA POT, d.o.o.
Planina 3, 4000 Kranj, SI EU
tel     ++386 (0) 4 280 66 03
e-mail  hinko.kocevar at cetrtapot.si
http    www.cetrtapot.si




More information about the busybox mailing list