On 2025-02-11 22:31, Dave Horsfall wrote:
On Tue, 11 Feb 2025, Norman Wilson wrote:
Remind them that ed (pronounced e d) is the
standard editor.
A former boss of mine insisted that everyone had better know how to use
"ed", because after a system crash it might be the only editor
available...
A bunch of years ago (~1997), I had a customer in my colo DC hose up
their Solaris box, changed root's shell to /user/local/bin/bash, then
logged out. Didn't have 'sudo' installed (we just log in as root when
we need to do things as root). I don't remember if they even had any
non-priv accounts on there.
They needed my help to fix it.
They didn't want me to fix it, he could do it himself...
So, I went and fetched a Solaris install CD, got him to boot that
into single-user mode. He immediately tried to edit /etc/passwd, but
1) that was the file on the CD, not the OS, 2) for some reason the
termcap/terminfo stuff wasn't working properly, so, vi didn't work,
neither did ex. I then had to walk him through mounting the real / fs,
then give him keystroke by keystroke ed commands to edit the proper
passwd file. Not that ed is/was hard, but he'd never used it and had
no idea how to even get started with it.
Could we have done this from the live system? Yeah, but he was a bit of
a pain as a customer, so, I decided to be a bit malicious. Guy tended
to be a bit of a know-it-all, but still needed my help with lots of
pretty basic tasks. The pure fact that he tried to change root's shell
AND borked the attempt might give you an idea.
--
Michael Parson
Pflugerville, TX