Se você sabe a senha do root, então você pode fazer
$ su root
# rm /etc/sudoers.d/jupyter
visudo
validará os arquivos sudo se no modo de edição; você o executou no modo de exportação ...
visudo
me avisou sobre erros de sintaxe, então saí sem fazer alterações. Eu decidi criar um novo arquivo dentro de /etc/sudoers.d
. Infelizmente, não prestei atenção suficiente à sinopse do arquivo de mensagens e emiti sudo visudo -x /etc/sudoers.d/jupyter
(o argumento correto deveria ter sido -f
não -x
). Isso exportou minha configuração em vez de criar um novo arquivo e o resultado líquido é não mais sudo .
visudo
deveria funcionar dessa maneira? (não ser snide, mas o objetivo é proteger os usuários, certo?) A página de manibra do Debian afirma que pelo menos verifica se os arquivos de entrada e saída não são os mesmos. Mas aparentemente não verifica se o destino da exportação é apropriado? Usando o Debian 8 (32 bits)
>>> /etc/sudoers.d/jupyter: syntax error near line 1 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 1 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 2 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 2 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 3 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 5 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 7 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 9 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 9 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 10 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 11 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 11 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 12 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 13 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 13 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 14 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 14 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 15 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 16 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 16 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 17 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 18 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 18 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 19 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 20 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 20 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 21 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 23 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 24 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 24 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 25 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 26 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 26 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 27 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 27 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 28 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 29 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 29 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 30 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 31 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 31 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 32 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 33 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 33 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 34 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
sudo: parse error in /etc/sudoers.d/jupyter near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Se você sabe a senha do root, então você pode fazer
$ su root
# rm /etc/sudoers.d/jupyter
visudo
validará os arquivos sudo se no modo de edição; você o executou no modo de exportação ...