0

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,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User myuser may run the following commands on ubuntu-xenial:
    (ALL) NOPASSWD: ALL

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 '17 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... – Toan Nguyen Nov 8 '17 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.