1

I did sudo apt-get update && sudo apt-get upgrade. It went through, until it hit the sudo package, which sudoers file is altered. I called up the diff in VIM and exited it with :q. Instead of prompting me again, it took the default action and kept my altered version.

I intended to install the package distributed version of /etc/sudoers, how can I do this in retrospect? I tried apt-get install --reinstall sudo, without a change.

Output of apt-get upgrade:

Setting up sudo (1.8.16-0ubuntu1.2) ...

Configuration file '/etc/sudoers'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sudoers (Y/I/N/O/D/Z) [default=N] ? D

Configuration file '/etc/sudoers'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sudoers (Y/I/N/O/D/Z) [default=N] ?
...
Senkaku
  • 123
  • 5
  • 2
    Possible duplicate of [How can I restore configuration files?](http://askubuntu.com/questions/66533/how-can-i-restore-configuration-files) – Byte Commander Sep 09 '16 at 16:57
  • Is it safe to do so for sudo? As my customizations to sudo are essential to login to my server. – Senkaku Sep 09 '16 at 17:07
  • You asked to replace your custom config file with the new one provided by the updated package. This will of course not preserve your changes. – Byte Commander Sep 09 '16 at 17:09
  • Of course not, but will I be able to apply my modifications in the process? I tried the approach mentioned in the link posted by you and as suspected, sudo got broken in the process, as there is no /etc/sudoers file anymore, after removing it. So my problem just got a bit bigger. :) – Senkaku Sep 09 '16 at 17:17
  • You can use `pkexec` as replacement while `sudo` is not working. – Byte Commander Sep 09 '16 at 18:14

0 Answers0