From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FnG5f-0006MJ-9Z for garchives@archives.gentoo.org; Mon, 05 Jun 2006 14:29:59 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k55ESsHx028340; Mon, 5 Jun 2006 14:28:54 GMT Received: from mail01.emarketsouth.com (mail01.emarketsouth.com [208.247.233.6]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k55ESrcZ021024 for ; Mon, 5 Jun 2006 14:28:53 GMT Received: (qmail 1121 invoked by uid 399); 5 Jun 2006 14:32:22 -0000 Received: from unknown (HELO onyx) (64.192.54.4) by mail01.emarketsouth.com with SMTP; 5 Jun 2006 14:32:22 -0000 Subject: Re: [gentoo-embedded] script that changes password for busybox From: Ned Ludd To: gentoo-embedded@lists.gentoo.org In-Reply-To: <1149445959.15475.12.camel@localhost> References: <1149445959.15475.12.camel@localhost> Content-Type: text/plain Organization: Gentoo Linux Date: Mon, 05 Jun 2006 10:28:52 -0400 Message-Id: <1149517732.32083.3.camel@onyx> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit X-Archives-Salt: 1cb4681e-49fe-4e63-b05c-c54b37a824f1 X-Archives-Hash: e0dbdd2865e3d9d9f628ceaed14634cb 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 Gentoo Linux -- gentoo-embedded@gentoo.org mailing list