I keep seeing this whenever enter sudo on different user than ubuntu

You must SSH in as root to run this command: sudo

Here is the output of sudo -l -U myuser

Matching Defaults entries for serverpilot on ubuntu-xenial:
    env_reset, mail_badpass,

User myuser may run the following commands on ubuntu-xenial:

I added myuser to /etc/sudoers.d/90-cloud-init-user I'm using Vagrant to manage my machines.

P/s: Before I posted this, I'm still able to add new sudo user by above way without any problems. (Previous ubuntu boxes version)

  • Are you running a restricted shell or something?
    – muru
    May 19, 2017 at 8:38
  • @muru No I didn't. The only way to get move on is set env bash inside .bash_profile. Is that make any sense to you? Because I never seen this before... Nov 8, 2017 at 6:23


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.