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”.


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

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.

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) {
      setTimeout(_qStart, sendDelay);
  var _qStop = function() { _q.length = 0; };
  var fn = function sendString(str) {
    str = str || '';
    var chr;
    for (var i=0; i < str.length; i++) {
      chr = str[i].charCodeAt();
  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;

then send text with sendString(‘yourletters’);