I'm running Ubuntu 16.04 with a plain-vanilla install. The server is on a rack in the server room, and I don't have physical access to it. Fortunately openssh was installed on the machine.

Today, I have to install stuff on it, but the only account on the server is the default account ('admin'), and it appears that I'm unable to SSH into the box using the default account because of the ssh config file.

I was able to get someone to go into the server room and add an unpriviliged user ('scott'). I am able to SSH in as this user, but I can't figure out how to get root access.

I tried:

  1. su root and get Authetication Failure
  2. su admin and get No passwd entry for user 'admin'
  3. sudo moduser -aG scott and get scott is not in the sudoers file. This incident will be reported.
  4. ssh admin@localhost and get Permission denied, please try again.

Any advice?

  • 3
    No. If the user you have access to is unprivileged i.e. has no rights to use sudo to run stuff as root, you can't do anything. There is no way to bypass this security measure without physical access or another, working admin account. – Byte Commander Mar 29 '18 at 22:44
  • Maybe you just got the username "admin" wrong. It does not seem to exist on this system. Are you sure that is the correct name for the privileged account? – Sebastian Stark Mar 30 '18 at 0:57
  • To get a root shell, use sudo -i and type in your user password. See help.ubuntu.com/community/RootSudo and askubuntu.com/questions/24006/… – Panther Mar 30 '18 at 6:12
  • @SebastianStark That was the correct answer. The username was Admin (with capital A), but in the passwd file, it was lowercased. When I used the proper case, it worked! Thanks! – mankowitz Apr 3 '18 at 15:27

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.