On 6/17/14, Darac Marjal <mailingl...@darac.org.uk> wrote: > On Tue, Jun 17, 2014 at 12:28:34PM +1000, Zenaan Harkness wrote: >> On 6/17/14, John D. Hendrickson and Sara Darnell <johnandsa...@cox.net> >> wrote: >> > Zenaan Harkness wrote: >> >> On 6/16/14, der.hans <deb-u...@lufthans.com> wrote: >> >>> Am 16. Jun, 2014 schwätzte Zenaan Harkness so: >> >>> moin moin, >> >>>> Most files in /etc/ have lost their file ownerships, having become >> >>>> user >> >>>> 1000. >> >> >> >>>> Can it be easily fixed? >> >>>> >> >>>> I am running etckeeper - is that useful to fixing this? >> >>> Yes, etckeeper keeps track of file ownership and permissions. >> >>> >> >>> See /etc/.etckeeper. >> >> >> >> OK, I guess I can run this: >> >> git log --pretty=oneline|more >> >> >> >> and view/record the commits that might have anything interesting (for >> >> replaying), and just try rolling back on day at a time, eg with: >> >> >> >> git reset --hard HEAD~1 >> >> >> >> Any other techniques I should keep in mind? >> >> /etc/passwd appears normal. >> >> > maybe reinstall the files. dpkg can do that. >> >> That sounds good. How would I that? >> >> sudoers, sudoers.d, shadow and cups/ seem fine, but _everything_ else >> is 1000.1000. >> >> Looks like a lot of packages to reinstall - is there a semi-automated >> way, or just spend the hour or two to reinstall everything? > > One possibility might be to debootstrap a directory and then use "chown > --reference chrootdir/etc/foo /etc/foo ; chmod --reference > chrootdir/etc/foo /etc/foo"
Interesting option "--reference". Looks like it could be quite useful. Unfortunately I have so many packages installed, it would be a rather large chroot once done, just to get ownerships back. Theoretically do-able though... thanks. I have been hoping that there was something inside etckeeper that would make this much easier. I'll do some more research. Thanks again all, Zenaan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CAOsGNSRK4aFs3K1qurcSoS0HSDo7_WO-LxUA=zy5qsxt2gd...@mail.gmail.com