[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: r42721 - trunk/packages/arch/arm/glantank/debian



Op 19-11-2006 om 22:37 schreef Martin Michlmayr:
> * Joey Hess <joeyh@debian.org> [2006-11-19 13:27]:
> > > +sed 's/\(:[^:]*:\)[0-9]*/\1/' < /target/etc/shadow > /target/etc/shadow.$$
> > > +mv /target/etc/shadow.$$ /target/etc/shadow
> > 
> > Doesn't this lose the correct permissions on /etc/shadow?
> 
> Good catch.  Got a better solution than manually setting them again
> afterwards?

sed -i 's/\(:[^:]*:\)[0-9]*/\1/' /target/etc/shadow


>From the manual of sed:

       -i[SUFFIX], --in-place[=SUFFIX]

              edit files in place (makes backup if extension supplied)



Cheers
Geert Stappers



Reply to: