On Sun, 2006-06-04 at 20:32 +0200, Natanael Copa wrote:
> Hi!
> 
> I'm trying to port a LEAF bering based project to gentoo-embedded. There
> is a web based UI (using haserl.sourceforge.net) to change password. The
> code to change the root password looks something like this:
> 
>           newrootpw=$(crypt sN "$root1")
>                 awk '
>                    BEGIN{
>                         FS=":";
>                         OFS=":";
>                         }
>                    /^root:/{
>                         $2="'"$newrootpw"'";
>                         }
>                    {print;}
>                 ' /etc/shadow > /tmp/shadow
> 
>                 mv /tmp/shadow /etc/shadow


Despite all of the security problems with the above I think 
a ~20 line custom c program for this would be ideal.


-- 
Ned Ludd <[EMAIL PROTECTED]>
Gentoo Linux

-- 
[email protected] mailing list

Reply via email to