From enf@pobox.com Wed Sep  6 13:35:24 EDT 2000
Article: 138686 of alt.sysadmin.recovery
From: Eric Fischer <enf@pobox.com>
Newsgroups: alt.sysadmin.recovery
Subject: Re: Root<>root
Date: 28 Aug 2000 20:16:15 GMT
Organization: EnterAct Corp.
Lines: 46
Approved: enf@pobox.com
Message-ID: <8oehaf$498$1@news.enteract.com>
References: <slrn8qlar4.kem.will@mylanders.com> <87aedx8cqn.fsf@jef-nt.mdacc.tmc.edu>
NNTP-Posting-Host: shell-1.enteract.com
X-Trace: news.enteract.com 967493775 4392 207.229.143.40 (28 Aug 2000 20:16:15 GMT)
X-Complaints-To: abuse@enteract.com
NNTP-Posting-Date: 28 Aug 2000 20:16:15 GMT
X-Newsreader: trn 4.0-test72 (19 April 1999)
Originator: enf@enteract.com (Eric Fischer)
Path: news.syr.edu!news.maxwell.syr.edu!newsfeed.enteract.com!news.enteract.com!not-for-mail
Xref: news.syr.edu alt.sysadmin.recovery:138686

Jonathan Fosburgh  <syjef@mail.mdacc.tmc.edu> wrote:

> > One of my cow-orkers just managed to, while in /etc/passwd, logged in
> > as root, change the entry for the super-user from 'root' to 'Root'.
> 
> That's a problem I run into on some systems with bad versions of vi
> and/or terminal emulation that don't understand how certain keys (I
> think it tends to be arrow keys) work.  Fortunately, I know not to
> save it.

More likely Del.  Recent versions of xterm seem to want to send ^[[3~
for the Delete key instead of ^?.  To vi, this means

   ^[     end the current insertion, if any
   [3     an error: [ is only supposed to be followed by another [
   ~      change the capitalization of the current character

Or it could be the Function keys F5 through F12, which, at least in recent
versions of xterm, do things like

   ^[[15~ end insertion (if any); an error; change case of 5 characters
   ^[[16~ end insertion (if any); an error; change case of 6 characters
   ...
   ^[[23~ end insertion (if any); an error; change case of 3 characters
   ^[[24~ end insertion (if any); an error; change case of 4 characters

ANSI-standard arrow keys are less harmful:

   ^[[A   end insertion (if any); then an error
   ^[[B   end insertion (if any); then an error
   ^[[C   end insertion (if any); then an error
   ^[[D   end insertion (if any); then an error

   ^[OA   end insertion (if any); insert a new line above containing A
   ^[OB   end insertion (if any); insert a new line above containing B
   ^[OC   end insertion (if any); insert a new line above containing C
   ^[OD   end insertion (if any); insert a new line above containing D

as are F1 through F4:
  
   ^[OP   end insertion (if any); insert a new line above containing P
   ^[OQ   end insertion (if any); insert a new line above containing Q
   ^[OR   end insertion (if any); insert a new line above containing R
   ^[OS   end insertion (if any); insert a new line above containing S

eric


