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
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
09-15-2011, 04:12 PM
Peter Beck
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
09-15-2011, 11:34 PM
D G Teed
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.*
09-15-2011, 11:57 PM
Walter Hurry
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
09-16-2011, 12:17 AM
D G Teed
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, (
> 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.
09-16-2011, 04:53 PM
Brad Alexander
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
09-22-2011, 07:57 AM
Brian Ryans
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.
09-26-2011, 07:14 PM
Bryan Irvine
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