Re: Need to ( re-chown /etc )

2008-09-30 Thread Jeremy Chadwick
On Tue, Sep 30, 2008 at 06:57:20PM -0700, Mike Price wrote:
 I needed to edit the /etc/pf.conf so I accidentally typed: chown -r /etc
 Can someone please help me with a command to change /etc back to the way it
 was?

Please stop asking this question over and over.  You've posted it to the
-questions list twice, and to the -hackers list once.

Kevin Kinsey [EMAIL PROTECTED] responded to you with an mtree command
that should do the trick.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Need to ( re-chown /etc )

2008-09-30 Thread Paul Schmehl
--On September 30, 2008 6:57:20 PM -0700 Mike Price [EMAIL PROTECTED] 
wrote:



I needed to edit the /etc/pf.conf so I accidentally typed: chown -r /etc
Can someone please help me with a command to change /etc back to the way
it was?


If that is literally the command you typed, you should have gotten an 
error message, and nothing should have been changed.  Chown requires at 
least one identifier (uid) before it will work.


Paul Schmehl, If it isn't already
obvious, my opinions are my own
and not those of my employer.
**
WARNING: Check the headers before replying


Re: Need to ( re-chown /etc )

2008-09-30 Thread Jon Radel
Mike Price wrote:
 I needed to edit the /etc/pf.conf so I accidentally typed: chown -r /etc
 Can someone please help me with a command to change /etc back to the way it
 was?

Did Kevin Kinsey's suggestion not work?  It would be helpful if you gave
some hint as to why you're asking this again.

However, you should realize that you destroy information when you change
all the ownership information to a uniform value.  You need to:

1)  Know what the value for each file was so you can set it back, or
2)  Use your backups, or
3)  Check what the standard files are set to in the distribution (as
Kevin suggested), or
4)  Know that most, but not all, files in /etc are user root and group
wheel, use those values, and hope for the best.

In other words, there really isn't a command to fix the damage you've
done.

However, as I'm sure you realize by now, recursively destroying
information in or about system files tends to be a bad idea.  As is, as
a general rule, using chown as a privileged user just so that you can
edit a file such as this as an unprivileged user.

--Jon Radel
[EMAIL PROTECTED]


smime.p7s
Description: S/MIME Cryptographic Signature