Issue in running sudo visudo command? visudo: /etc/sudoers busy ,try again later
There is an issue when I try to run the command sudo visudo
and the error was shown:
visudo: /etc/sudoers busy ,try again later
Solution 1:
First find out which process is using /etc/sudoers
file:
sudo lsof /etc/sudoers
from your outputs, seems it's another visudo
instance:
visudo 9348 root 5uW REG 8,1 755 9699545 /etc/sudoers
so, start a root shell:
sudo -i
then run:
kill -15 9348
ps --no-heading 9348 || kill -9 9348
open another terminal, run:
sudo visudo
make sure everything works fine, then you can log out from your root shell.