passwd

Kevin Cernekee cernekee at gmail.com
Mon May 9 17:54:59 UTC 2011


On Mon, May 9, 2011 at 10:01 AM, Sergey Naumov <sknaumov at gmail.com> wrote:
> May be you know how to forge /etc/passwd file for embedded system? I
> can't execute target passwd (also adduser etc.) on the host machine
> and host's version can only write into /etc/passwd. Is there more
> reliable and elegant way than to make a backup of current files, forge
> new ones and then restore originals (so how to force passwd and
> company to use another file to deal with)?

On the host side I usually wind up doing something like:

echo -n `htpasswd -bc /dev/stdout root test` > passwd
echo ":0:0:root:/root:/bin/sh" >> passwd


More information about the busybox mailing list