LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 03-09-2005, 09:22 AM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
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?
 
Old 03-09-2005, 09:29 AM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
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.
 
Old 03-09-2005, 09:35 AM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
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).

Last edited by frob23; 03-09-2005 at 09:36 AM.
 
Old 03-09-2005, 09:51 AM   #4
Hammett
Senior Member
 
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,074

Rep: Reputation: 59
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

Last edited by Hammett; 03-09-2005 at 09:52 AM.
 
Old 03-09-2005, 09:51 AM   #5
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
Technoslave,
I liked the one with the server in Italy while you were in the USA. Very nice !!!
 
Old 03-09-2005, 09:53 AM   #6
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
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)
 
Old 03-09-2005, 09:59 AM   #7
bullium
Member
 
Registered: Aug 2003
Location: Ohio
Distribution: Ubuntu 12.04, Mint 13, RHES 5.5, RHES 6
Posts: 146

Rep: Reputation: 17
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!
 
Old 03-09-2005, 10:02 AM   #8
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
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
 
Old 03-09-2005, 10:17 AM   #9
Hammett
Senior Member
 
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,074

Rep: Reputation: 59
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...
 
Old 03-09-2005, 10:29 AM   #10
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
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 -
 
Old 03-09-2005, 10:40 AM   #11
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 03-09-2005, 02:07 PM   #12
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
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...
You should be using sudo instead of using su or su - :-D
 
Old 03-09-2005, 02:21 PM   #13
bullium
Member
 
Registered: Aug 2003
Location: Ohio
Distribution: Ubuntu 12.04, Mint 13, RHES 5.5, RHES 6
Posts: 146

Rep: Reputation: 17
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"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
made a time mistake speel Linux - Newbie 2 04-30-2005 03:20 AM
Ok i made the biggest mistake anyone could ever make... Soujiro Linux - Software 1 04-24-2004 01:47 AM
I made a big mistake? BajaNick Linux - Software 8 12-28-2003 09:18 PM
I made a mistake! Need help now jcksrobbins Mandriva 8 08-30-2003 10:17 PM
I made a mistake need help here ikw38 Linux - Networking 4 06-16-2003 01:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration