LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   what is the biggest mistake you've ever made as admin? (https://www.linuxquestions.org/questions/general-10/what-is-the-biggest-mistake-youve-ever-made-as-admin-299589/)

ddaas 03-09-2005 09:22 AM

what is the biggest mistake you've ever made as admin?
 
Hi,
Yesterday I've made the biggest mistake as a Network Admin :(
What is your biggest? I am curious and the others can also learn from our mistakes.


The 2 biggest mistakes I've ever make:

1) I wanted to take the read and execute permission from ‘others’ from all files in the root directory. Also for hidden files. So I did #chmod -R o-rx /root/.*

After that my servers (in an enterprise environment) crashed :(
My luck was that this happened during the lunch time and not too many were affected. It took me an hour to rescue my linux.


2) playing with sql I deleted a table with thousands of records. We lost only 1 week ( cca 100 records) because the hosting provider had a backup for the rest.



Advice: don’t play with root and think twice before do once!!

What about yours?

Technoslave 03-09-2005 09:29 AM

Heh, not bad.

I've done a couple of good ones. For the most part I haven't had a good screw up in a few years...but here's a small list.

Did an su - then an rm -rf *, meant to just do su, this was before sudo and the like.

When I was wee and just starting out, I got an error in Solaris about how my libc.so was a version too old. So, I did what I thought was legit, found another solaris box with the same OS version, saw that it's libc was newer and copied it over to my box. I then did a mv libc.so libc.so.bak, just in case the one I had didn't work. The thing that really made this bad was that the server in question was in Italy, and I was in the US. I had to talk someone through booting off of cd, mounting the HD and doing the mv back for me.

The kicker is, I ended up doing this same thing 2 years later at a different company. Fortunately, I was local to the box and had it up and running again in a matter of minutes...but boy, how em-bare-ass-ing.

The other good one. I was just starting to get in to the whole "security" thing, a good 6 or 7 years ago. And I had a neat-o little script that helped secure a lot of things...it also turned up the logging on the server. It included things like file create and destorys being logged. On my test box I didn't tihnk it was logging too much, and it ran well for a couple of days, then I got the go ahead to put it on our mail servers. At an 80 thousand person company, you can imagine how quickly those log files filled up...

Anyway, that was really my last big "oops", all my other "oops" are generally localized to just my user or dropping an interface when I shouldn't have. I've learened from my mistakes - hopefully.

frob23 03-09-2005 09:35 AM

I was sitting at my desktop with a bunch of xterm windows open. Some of them were connected to my junk computer and others were local. Somehow, I managed to be in the wrong window, in the wrong directory, when I typed "rm -rf *" and proceeded to wipe out a good third of my operating system on the important computer.

I was lucky that I did not lose any user data (mostly school work and projects)... but I have since taken the advice to heart that including your hostname in the command prompt is a "good thing"(tm).

Hammett 03-09-2005 09:51 AM

Quote:

Originally posted by Technoslave

Did an su - then an rm -rf *, meant to just do su, this was before sudo and the like.

Just a question....what's the difference between su and su - ??

The biggest mistake I've done is to format a wrong partition and lose ALL the things in there. Lots of data and stuff like that. Took me months to recover that.
I just thought hda6 was my home partition, so i formated hda5, the surprise later on to discover I had lost like 20Gb of data....not my happiest day ;)

ddaas 03-09-2005 09:51 AM

Technoslave,
I liked the one with the server in Italy while you were in the USA. Very nice !!!

ddaas 03-09-2005 09:53 AM

Hammett,
su = become root with the old environment (of the user before su )
su - = become root with the environment of the root (path, variables, etc)

bullium 03-09-2005 09:59 AM

Quote:

Originally posted by ddaas
Hammett,
su = become root with the old environment (of the user before su )
su - = become root with the environment of the root (path, variables, etc)

ouch! :eek:

ddaas 03-09-2005 10:02 AM

I forgot to mention that before I did #chmod -R o-rx /root/.* , I did #echo /root/.* just to be sure, but I didn't see the . and .. directories
So all the files from /bin/ , /sbin/ which have r and x for the others became without. After that I became a normal user and observed that I couldn't do ls or su. :(

ddaas

Hammett 03-09-2005 10:17 AM

Quote:

Originally posted by ddaas
Hammett,
su = become root with the old environment (of the user before su )
su - = become root with the environment of the root (path, variables, etc)

Ok, I got it, but what's the difference in terms of security and operation of the system? I mean, can you do the same things being su as being su - ? Should I log into root as su only ? (actually I'm always logging as su -)
I'm very n00b in terms of security... :scratch:

ddaas 03-09-2005 10:29 AM

ex: your are user1 and you are in your home dir /home/user1

You do: #su and them rm -rf * The result is that your delete everything from /home/user1 because you remain there after su.
If you do su - and then rm -rf * you delete everything from the root directory.


There are no differences other that environment between su and su -

reddazz 03-09-2005 10:40 AM

I once extracted a file that had a path usr/* and I wanted to delete it as root and did rm -rf /usr/* instead of rm -rf usr/* and trashed my system.

Technoslave 03-09-2005 02:07 PM

Quote:

Originally posted by Hammett
Ok, I got it, but what's the difference in terms of security and operation of the system? I mean, can you do the same things being su as being su - ? Should I log into root as su only ? (actually I'm always logging as su -)
I'm very n00b in terms of security... :scratch:

You should be using sudo instead of using su or su - :-D

bullium 03-09-2005 02:21 PM

Quote:

Originally posted by Technoslave
You should be using sudo instead of using su or su - :-D
Couldn't you just do this, its just as safe as sudo right?

Code:

su -c "command"


All times are GMT -5. The time now is 12:58 AM.