Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 1996 09:17:15 -0600
From:      Sean Kelly <kelly@fsl.noaa.gov>
To:        dbrockus@m1.sprynet.com
Cc:        questions@freebsd.org
Subject:   Re: Please Help ... I am locked out of a FreeBSD machine
Message-ID:  <9605081517.AA18963@fslg8.fsl.noaa.gov>
In-Reply-To: <199605072243.PAA09812@m1.sprynet.com> (dbrockus@m1.sprynet.com)

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "David" == "Test Account" <dbrockus@m1.sprynet.com> writes:

    David> Did the ".*" cause chown to change the ownership to the
    David> ".."directory, causing the change off the root dir?

Yes ... and with the -R option, it decided to continue down the
directory tree ... and down, and down, and down ...  :-(

    David> After the change in the ownership of those files.  No one
    David> can log in.  I am logged in right now as a normal user.  I
    David> can not change any of the ownerships.  After the chown
    David> command I exited "su", which was a very stupid mistake.

Doh!

    David> So now, no one can log in and I have no idea what to do.

First, shut down the system any way you can.  CTRL+ALT+DELETE on the
console should do it---but if you have that feature disabled, run the
command `sync' three times and hit the reset button.

Then, boot up as single user.  At the boot: prompt, type

	hd(0,a)/kernel -s

to do that.  It might not work with the permissions all wrong ... but
it just might!

If it does, the best way to proceed is to restore from backup tape.
This way, you won't have to worry about what the correct owner is for
all those various files.

If you haven't been taking backups, then you could try to change the
ownerships of every single file by hand.  I could even email you a
script of commands that should restore the permissions of the base
installation files, but be warned that I'm running 2.1 and not 2.0.5.

Yet another option is to upgrade your 2.0.5 installation to 2.1.
Then, just the users' home directories permissions need to be fixed.

In any case, good luck.  You've committed one of the classic Unix
mistakes, and should be proud.  (FYI, I've down the ``rm -rf /''
mistake not once but *twice* so far!  Once, as an honest mistake.  The
second time, while I was trying to email what happened by highlighting
the text to paste into a mail message but instead pasting into a root
shell!  DOH!  :-)

-- 
Sean Kelly                          
NOAA Forecast Systems Laboratory    kelly@fsl.noaa.gov
Boulder Colorado USA                http://www-sdd.fsl.noaa.gov/~kelly/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9605081517.AA18963>