FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-15-2011, 12:58 PM
Brad Alexander
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

Thanks Andrew. I started using colored prompts to give visual cues as to whether I am on a local or remote machine.

This was many years ago that this happened.

--b

On Wed, Sep 14, 2011 at 9:53 PM, Andrew Reid <reidac@bellatlantic.net> wrote:

> I had a case where it had snowed, and instead of driving 50 miles in snow

> and ice with dodgy DC drivers, I'd work from home. Had my laptop, was doing

> work. Well, they scheduled a meeting for that afternoon (at about lunch

> time), so I got ready and headed in to the office. I typed halt in a window

> on my machine, and went to get my stuff together. Came back a few minutes

> later and found the laptop was still up. Had inadvertantly (I blame

> focus-follows-mouse) shut down a remote box, our production webserver...



*You can use "molly-guard" to protect against this -- installed on the

remote system, it prompts for confirmation if a shutdown, reboot, halt,

or poweroff command is entered in a remote shell.



<http://packages.debian.org/squeeze/molly-guard>



*There's a legend that the name comes from an actual little girl named

Molly, who was visiting the workplace and tried out the shiny red button.



* * * * * * * * * * * * * * * *-- A.

--

Andrew Reid / reidac@bellatlantic.net





--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: http://lists.debian.org/201109142153.00984.reidac@bellatlantic.net
 
Old 09-15-2011, 02:43 PM
"Bonno Bloksma"
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

Hello Aaron,


Needless to say, it was a valuable lesson, one I'll never forget. In fact,
it prompted me to use LocalCommand in my ~/.ssh/config, and echo colored
prompts, depending on whether or not I'm on a production (blinking bold red),
staging (bold yellow) or development (bold green) server.


Like Bryan wrote, that seems a very good idea.

I have been looking at LocalCommand an PermitLocalCommand in the ssh_config file but the
documentation is a bit sparse.

Is it indeed all client sided, then how do I specify which command to use for which server?
Can you provide a few sample lines?


So far I had only one (major) mistake and I was able to correct it on the fly.
I thought I did an "init 0" on my machine but did it in the wrong screen where I had a ssh session
to a production server. Fortunately I noticed immediately what I had done wrong and issued an "init
6" before the ssh session closed. It worked, the server did a reboot instead of a shutdown. :-)
After that I became even more careful looking at the prompt to see where I am but..... color coding
like that seems a good idea as well.


p.s. Will that work with a PuTTY session from a Windows client as well?

Bonno Bloksma



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 63FFA3892F9F46D1939E5139F3E3DBAD@staf.tio.nl">http ://lists.debian.org/63FFA3892F9F46D1939E5139F3E3DBAD@staf.tio.nl
 
Old 09-15-2011, 03:53 PM
Aaron Toponce
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

On Thu, Sep 15, 2011 at 04:43:34PM +0200, Bonno Bloksma wrote:
> I have been looking at LocalCommand an PermitLocalCommand in the
> ssh_config file but the documentation is a bit sparse.
> Is it indeed all client sided, then how do I specify which command to use for which server?
> Can you provide a few sample lines?

I blogged about it here: http://pthree.org/?p=2007

> p.s. Will that work with a PuTTY session from a Windows client as well?

Well, it depends. LocalCommand is a command that is running local to your
SSH client. I'm not sure what is available to you on a Windows machine with
PuTTY, but you can certainly dig around and see what you get. Or you could
install Cygwin, and get access to a unix-like environment, where you have
better tools to do something like this.

--
. o . o . o . . o o . . . o .
. . o . o o o . o . o o . . o
o o o . o . . o o o o . o o o
 
Old 09-15-2011, 04:12 PM
Peter Beck
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

Aaron Toponce <aaron.toponce@gmail.com> quatschte am Thu, Sep 15, 2011 at 09:53:24AM -0600:
>
> I blogged about it here: http://pthree.org/?p=2007

Hi Aaron,

thanks for sharing this link. I am using molly-guard since some years,
but the colored shell looks just great. I love it! ;-)

Cheers
Peter


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110915161217.GA14009@peanut.datentraeger.li">htt p://lists.debian.org/20110915161217.GA14009@peanut.datentraeger.li
 
Old 09-15-2011, 11:34 PM
D G Teed
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

On Wed, Sep 7, 2011 at 1:00 PM, Bob Proulx <bob@proulx.com> wrote:


> jacques wrote:

>> by error most of the binaries in /usr are erased (killing rm :-(

>

> Everyone has made that mistake at some point. *I know I have!


I was hunting for the disk hog using the curses based ncdu utility.I found a large tar file which could be deleted without issue.
It was in an oracle production directory area. *Due to a bug in ncdu,(*http://sourceforge.net/tracker/?func=detail&aid=2829950&group_id=200175&atid=9724 49 )
it didn't delete the highlighted item, but the one next to it,which was the oracle production database. *Recovery was easyto do from snapshot files from the database. *I'll never use
ncdu or a similar UI to delete anything ever again - it is only rm for me.*
 
Old 09-15-2011, 11:57 PM
Walter Hurry
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

On Thu, 15 Sep 2011 20:34:38 -0300, D G Teed wrote:

> I was hunting for the disk hog using the curses based ncdu utility. I
> found a large tar file which could be deleted without issue. It was in
> an oracle production directory area. Due to a bug in ncdu, (
> http://sourceforge.net/tracker/?
func=detail&aid=2829950&group_id=200175&atid=97244 9)
> it didn't delete the highlighted item, but the one next to it, which was
> the oracle production database. Recovery was easy to do from snapshot
> files from the database.

I don't think that is the full story. Oracle databases do not consist of
a single file; there are many. Control files, tablespace files, undo
segments, redo logs, etc, etc. And if the database is properly organised,
loss of a single file should not present any problem at all.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: j4u3cc$73f$1@dough.gmane.org">http://lists.debian.org/j4u3cc$73f$1@dough.gmane.org
 
Old 09-16-2011, 12:17 AM
D G Teed
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

On Thu, Sep 15, 2011 at 8:57 PM, Walter Hurry <walterhurry@lavabit.com> wrote:

On Thu, 15 Sep 2011 20:34:38 -0300, D G Teed wrote:



> I was hunting for the disk hog using the curses based ncdu utility. I

> found a large tar file which could be deleted without issue. It was in

> an oracle production directory area. *Due to a bug in ncdu, (

> http://sourceforge.net/tracker/?

func=detail&aid=2829950&group_id=200175&atid=97244 9)

> it didn't delete the highlighted item, but the one next to it, which was

> the oracle production database. *Recovery was easy to do from snapshot

> files from the database.



I don't think that is the full story. Oracle databases do not consist of

a single file; there are many. Control files, tablespace files, undo

segments, redo logs, etc, etc. And if the database is properly organised,

loss of a single file should not present any problem at all.



It was a directory which was deleted by the bug in ncdu.
 
Old 09-16-2011, 04:53 PM
Brad Alexander
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

Thanks, Aaron...Using ssh is brilliant. I have a script I set up once called bashprompt that I stick in /etc and source from .bashrc, but this could be a more elegant solution (though somewhat higher maintenance).

--b


On Thu, Sep 15, 2011 at 11:53 AM, Aaron Toponce <aaron.toponce@gmail.com> wrote:

On Thu, Sep 15, 2011 at 04:43:34PM +0200, Bonno Bloksma wrote:

> I have been looking at LocalCommand an PermitLocalCommand in the

> ssh_config file but the documentation is a bit sparse.

> Is it indeed all client sided, then how do I specify which command to use for which server?

> Can you provide a few sample lines?



I blogged about it here: http://pthree.org/?p=2007



> p.s. Will that work with a PuTTY session from a Windows client as well?



Well, it depends. LocalCommand is a command that is running local to your

SSH client. I'm not sure what is available to you on a Windows machine with

PuTTY, but you can certainly dig around and see what you get. Or you could

install Cygwin, and get access to a unix-like environment, where you have

better tools to do something like this.



--

. o . * o . o * . . o * o . . * . o .

. . o * . o o * o . o * . o o * . . o

o o o * . o . * . o o * o o . * o o o
 
Old 09-22-2011, 07:57 AM
Brian Ryans
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

Quoting The_Ace on 2011-09-14 03:08:
> drop database Live_database;
>
> Restored the previous day's backup and blamed it on a bad power supply :P

You coulda blamed it on any of the outputs of "fortune bofh-excuses" and
most users would likely not know.

My worst administration mistake? Forgetting to check asset numbers
before sanitizing a machine -- I'd sanitized an actively used
diagnostics computer instead of the identical-looking machine sitting
right next to it. Though that machine was the cleanest in the shop
afterwards. dban, dish soap, compressed air and water.

Fortunately, I had an image of that machine. That was my noob (used
self-perjoratively!) moment for that month.

--
_ Brian Ryans 8B2A 54C4 E275 8CFD 8A7D 5D0B 0AD0 B014 C112 13D0 .
( ) ICQ 43190205 | Mail/Jabber/Yahoo/MSN: BrianLRyans@gmail.com ..:
X ASCII Ribbon Campaign Against HTML mail and v-cards: asciiribbon.org
/ DRM: encryption which assumes Bob is also Eve and Mallory.
 
Old 09-26-2011, 07:14 PM
Bryan Irvine
 
Default Worst Admin Mistake? was --> /usr broken, will the machine reboot ?

On Thu, Sep 22, 2011 at 12:57 AM, Brian Ryans <brian.l.ryans@gmail.com> wrote:
> Quoting The_Ace on 2011-09-14 03:08:
>> drop database Live_database;
>>
>> Restored the previous day's backup and blamed it on a bad power supply :P
>
> You coulda blamed it on any of the outputs of "fortune bofh-excuses" and
> most users would likely not know.
>
> My worst administration mistake? Forgetting to check asset numbers
> before sanitizing a machine -- I'd sanitized an actively used
> diagnostics computer instead of the identical-looking machine sitting
> right next to it. Though that machine was the cleanest in the shop
> afterwards. dban, dish soap, compressed air and water.

Similar story:
We once unracked and decommissioned a server because someone had
accidentally switched the face-plates. We now label faceplate, some
point under the faceplate, and the back side as well.

What we actually unracked was a VM host. Luckily all the guests
vmotioned elsewhere, It was still a mess though.

I wasn't involved in that one. :-)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAG367gY5R-aZ22gJLBbDZu6arHEYXkdDJRrG4R8Pv9XQsQi4gw@mail.gmai l.com">http://lists.debian.org/CAG367gY5R-aZ22gJLBbDZu6arHEYXkdDJRrG4R8Pv9XQsQi4gw@mail.gmai l.com
 

Thread Tools




All times are GMT. The time now is 12:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org