Glenn Jones

Hello 👋 Welcome to my corner of the internet. I write here about the different challenges I encounter, and the projects I work on. Find out more about me.

Visudo: sudoers file busy, try again later

Ran into this issue while setting up an EC2 instance. My ssh session was interrupted while having done sudo visudo. I couldn’t access the file anymore, nor delete the related .tmp.

I found my solution in the comments here.

ps -ef|grep sudo
sudo kill -9 replace-with-visudo-process-nr

Repeat this for each process containing visudo. Afterwards I was able to sudo visudo again.

Links

Previous: Autonomous management of static websites with prismic.io, circleci and github pages
Next: Building my first chrome extension - website-to-api image uploader