sawyl: (Default)
[personal profile] sawyl
I find myself staring, in incomprehension and horror, at my session on my BSD box, wondering just why, exactly, I decided to kick this off:

sudo sh -c "find / -type f -printx | xargs /usr/sbin/chown new"

Fuck and double fuck. Nothing for it but to crash and reinstall, I guess...


Updated: In the end, I broke in to the root account — marginally harder than it would have been if I'd changed more than just file ownerships — and chowned all the files on / and /usr to root. This was enough to fix the worst of the problems, but I've still got to reapply all the setuids and sort out the files that shouldn't be owned by root.

Now that I know that I don't have to reinstall — I probably would if I wasn't planning to scrap the box in the near future — I'm rather enjoying the challenge of working out how to sort things out. Then, when I'm done, I'm going to install AIDE so that should I ever make such a heinous mistake again, I won't be forced to grovel through install sets and reinstall packages to fix things.

Date: 2007-11-17 02:53 pm (UTC)
From: [identity profile] gleet.livejournal.com
oops.

What does the -printx do? the find that comes with mac os x (so from bsd, really) has a -print, which I understand, but not a -printx

Date: 2007-11-17 03:37 pm (UTC)
From: [identity profile] sawyl.livejournal.com
It quotes spaces, tabs and other oddities so that xargs can handle them. It has the same net effect as -print0 on other systems.

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 21st, 2025 11:22 pm
Powered by Dreamwidth Studios