Question

lost user password, disabled root login. no sudo access

On ubuntu 14.04 with an admin user created. I have created a key for ssh and can login with my user without a password prompt. However i lost the password, and also hardened the root user login.

When i reset root password from the web panel, i am able to login, and prompted with to create mandatory new password. I do that and am immedidatly looged out and a new login propmt appears. When i enter my new password for root,i am responded with “login incorrect”.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The problem is you are prompted for the new password AGAIN, and if you fail, the prompt exists.

Its hard trying it by hand so you can try this code in developer tools :

var sendString = (function(rfb, force, sendDelay) { 
  sendDelay = sendDelay || 25;
  var _q = [];
  var _qStart = function() {
    var chr = _q.shift();
    if (chr) {
      rfb.sendKey(chr);
      setTimeout(_qStart, sendDelay);
    }
  };
  var _qStop = function() { _q.length = 0; };
  var fn = function sendString(str) {
    _qStop();
    str = str || '';
    var chr;
    for (var i=0; i < str.length; i++) {
      chr = str[i].charCodeAt();
      _q.push(chr);
    }
    _qStart();
  };
  if (rfb.sendString && true !== force) {
    console.warn('rfb.sendString not installed because it already exists.  Use force if you\'d like');
  }
  else {
    rfb.sendString = fn;
  }
  return fn;
})(rfb);

then send text with sendString(‘yourletters’);