On a box with X11 installed, it may happen that after sudo, the terminal moans about some X11 authentication errors.
X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication.
In order to resolve this, run as the user
$ xauth list
and copy paste that after becoming root with
$ sudo -i # xauth add previousoutput