Ubuntu 16.04 sudo problem Ubuntu 16.04 sudo problem
Posts 1 to 6 of 6
  1. #1

    TykeLike

    SimonMac's Avatar
    Join Date
    Aug 2010
    Location
    God's Own Republic Of Yorkshire
    Posts
    23,116

    Default Ubuntu 16.04 sudo problem

    I created a VM running Ubuntu 16.04 the user has never had a password, it's was setup using an SSH key and as far as I remember has always worked fine, however when i run any sudo commands it's asking for a password, obviously I've never set one so couldn't begin to imagine what it will be.

    Any idea what's going on?
    “Live a good life. If there are gods and they are just, then they will not care how devout you have been, but will welcome you based on the virtues you have lived by. If there are gods, but unjust, then you should not want to worship them. If there are no gods, then you will be gone, but will have lived a noble life that will live on in the memories of your loved ones.”

    ― Marcus Aurelius

  2. #2

    Ducklike

    Platypus's Avatar
    Join Date
    Dec 2007
    Location
    In the pub
    Posts
    8,867

    Default

    Quote Originally Posted by SimonMac View Post
    I created a VM running Ubuntu 16.04 the user has never had a password, it's was setup using an SSH key and as far as I remember has always worked fine, however when i run any sudo commands it's asking for a password, obviously I've never set one so couldn't begin to imagine what it will be.

    Any idea what's going on?
    Is is asking for the Root password?
    Is the user in the sudoers group?

  3. #3

    Super poster

    Lance's Avatar
    Join Date
    Sep 2013
    Location
    home
    Posts
    3,803

    Default

    Quote Originally Posted by SimonMac View Post
    I created a VM running Ubuntu 16.04 the user has never had a password, it's was setup using an SSH key and as far as I remember has always worked fine, however when i run any sudo commands it's asking for a password, obviously I've never set one so couldn't begin to imagine what it will be.

    Any idea what's going on?


    Can you logon to the VM as root and reset the user's password? If not then you're a bit scuppered short of mounting the VM disk onto another VM and editing the /etc/passwd and/or the /etc/shadow file manually.

    Or have a read of this..
    ubuntu - Creating an user without a password - Unix & Linux Stack Exchange
    See You Next Tuesday

  4. #4

    Contractor Among Contractors

    b0redom's Avatar
    Join Date
    Jun 2007
    Posts
    1,278

    Default

    Quote Originally Posted by Lance View Post
    Can you logon to the VM as root and reset the user's password? If not then you're a bit scuppered short of mounting the VM disk onto another VM and editing the /etc/passwd and/or the /etc/shadow file manually.

    Or have a read of this..
    ubuntu - Creating an user without a password - Unix & Linux Stack Exchange
    Boot into recovery mode, reset the root password, then su to root and change the user password?
    And the lord said unto John; "come forth and receive eternal life." But John came fifth and won a toaster.

  5. #5

    TykeLike

    SimonMac's Avatar
    Join Date
    Aug 2010
    Location
    God's Own Republic Of Yorkshire
    Posts
    23,116

    Default

    Quote Originally Posted by Platypus View Post
    Is is asking for the Root password?
    Is the user in the sudoers group?
    It's asking for the password for the user I created.

    Quote Originally Posted by b0redom View Post
    Boot into recovery mode, reset the root password, then su to root and change the user password?
    It's an azure VM so I can send some commands from the console which seem to work as root, will try using that to set the password of the account
    “Live a good life. If there are gods and they are just, then they will not care how devout you have been, but will welcome you based on the virtues you have lived by. If there are gods, but unjust, then you should not want to worship them. If there are no gods, then you will be gone, but will have lived a noble life that will live on in the memories of your loved ones.”

    ― Marcus Aurelius

  6. #6

    Super poster

    Lance's Avatar
    Join Date
    Sep 2013
    Location
    home
    Posts
    3,803

    Default

    Quote Originally Posted by SimonMac View Post
    It's asking for the password for the user I created.



    It's an azure VM so I can send some commands from the console which seem to work as root, will try using that to set the password of the account
    you can reset the master password of the VM with Azure.
    There's a 'reset password' panel under Support + Troubleshooting.
    That'll do the job.
    See You Next Tuesday

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •