This story is almost too embarrassing to tell, but there is an important
moral so here goes:

I was fiddling with a floppy distro (toms rt bt) to see how it works,
and with a view to putting drivers for my net card onto it for an
emergency booter (long story in itself). 

I put the floppy in my server box and mounted as a loop device the root
image stored on there. It had a boot up script I was particularly
interested in, I was looking at all this in midnight commander. I had
been root to do the mounting and continued as root. 

Trouble is I hit <enter> instead of <f3> on the bootup script which
executed it instead of viewing it. The server kept on working fine until
I tried something which made me realise the floppy boot script had
executed as root on the server machine's running redhat distro. As
typical boot scripts do in floppy distros, it wrote from scatch new
versions of :

/etc/passwd
/etc/profile
/etc/resolv.conf
/etc/networks

as well as a whole lot of other crap. Luckily I had stayed logged in as
root, and had some backups of the most important files (/etc/passwd was
a REAL worry until I realised there was a backup of it dated [date
deleted cos its so embarrassing], and I'd only created one user since
then!). Handy hint: in redhat every time you make a user, it makes a
group of the same name, and /etc/group was untouched, so I could see
what had been created.

Luckily it is all ok again now (I was able to go thru the boot script
and understand everything it did and reverse it). Luckily too I didn't
panic and log out, as I may not have been able to get back in!

Morals

1. never never ever do anything as root except as absolutely necessary

2. don't panic

(The latter is probably (c) Douglas Adams)

-- 
Nick Rout <[EMAIL PROTECTED]>

Reply via email to