[haiku-sysadmin] Re: I broke sudo on vmweb

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-sysadmin@xxxxxxxxxxxxx
  • Date: Thu, 17 Sep 2015 11:08:28 +0200

On 17.09.2015 03:22, waddlesplash wrote:

Well, this is the email I hoped I would never have to write...

Drupal started giving me 'access denied' when trying to access the
admin pages, so I logged in via SSH to see what was up. I figured I'd
add kallisti5 to sudoers at the same time while I was at it.

I did try to use visudo to edit the file (after poking around and
confirming we weren't using sudoers.d or 'sudo' groups), but that just
gave me 'command not found', so I just used nano instead, which
appears to have line-wrapped the file, so sudo now chokes on it. I
then tried to use pkit to get another editor instance to fix the
problem, but it appears pkit is failing because 2FA is not fully set
up yet (or because nobody bothered to configure it in the first
place.)

You can definitely use vi to fix the file (or even back it up and reconstruct it with cat or echo), if you still have a root shell. If not, I guess we'll have to shut the VM down, mount the disk image manually (or attach it to another VM?) to gain access to the FS and replace the file. Not that I have ever done that.

CU, Ingo


Other related posts: