From: Ned Ludd <solar@gentoo.org>
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] script that changes password for busybox
Date: Mon, 05 Jun 2006 12:17:42 -0400 [thread overview]
Message-ID: <1149524262.3315.22.camel@onyx> (raw)
In-Reply-To: <1149518744.20770.7.camel@localhost>
On Mon, 2006-06-05 at 16:45 +0200, Natanael Copa wrote:
> On Mon, 2006-06-05 at 10:28 -0400, Ned Ludd wrote:
> > 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.
>
> I was hoping for a solution without any coding, but yes, I'll probably
> end up with a custom c program. (I think somebody already did actually -
> just to get going)
the vchangepw util might be able to work on system auth.
> about the security problems, any suggestion how to change passwords
> securely from web interface? (https)
I have no idea what auth system you are using so it's hard to say.
But clearly the problem with the above awk script other than the
obvious /tmp race condition is that it would leave the shadow
file as mode 644 vs 600
> --
> Natanael Copa
>
--
Ned Ludd <solar@gentoo.org>
Gentoo Linux
--
gentoo-embedded@gentoo.org mailing list
next prev parent reply other threads:[~2006-06-05 16:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-04 18:32 [gentoo-embedded] script that changes password for busybox Natanael Copa
2006-06-04 23:54 ` Kelly Price
2006-06-05 7:41 ` Natanael Copa
2006-06-05 14:28 ` Ned Ludd
2006-06-05 14:45 ` Natanael Copa
2006-06-05 16:17 ` Ned Ludd [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-05 13:38 Morgan, Austin D.
2006-06-05 14:26 ` Natanael Copa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1149524262.3315.22.camel@onyx \
--to=solar@gentoo.org \
--cc=gentoo-embedded@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox