Solved

Password issue with Ubuntu

Posted on 2014-04-30
6
764 Views
Last Modified: 2014-05-04
I removed the password on the one and only administrator account. Now when I am asked to authenticate, I type in the old password and the authentication fails. It also fails if I do not type in any password.

I tried to put the password back by going to settings ->users, but I can't unlock the panel without authenticating.

Is there a way around this problem? How can I put back the password so that I can authenticate?

I am using Ubuntu 14.04 LTS

Thank you.
0
Comment
Question by:Lev Seltzer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 13

Accepted Solution

by:
stergium earned 500 total points
ID: 40031340
Hello.
This should do the trick:
This procedure gives you a full root shell! You can damage your system if you are not careful!

    When booting up press SHIFT (in systems 9.10 "karmic" or later) or ESC (in systems 9.04 "jaunty" or earlier) at the grub prompt and use the arrow keys to select the rescue mode option and press enter.
    The file system may be read only (it is in all currently supported releases). Remount as read write

        mount -rw -o remount /

    This will boot the system in rescue mode and you should arrive at a prompt that looks like this

        root@something

    To reset your password type this in

        passwd <username>

        Press return, then you will be prompted to enter and confirm a new password.
    Once you are done resetting your password you can than switch back to the normal GUI mode by putting this in

        init 2

If if appears to boot normally, but you see a message that says:

    Give root password for maintenance (or type Control-D to continue):

then you will have to try a different trick below.

( https://help.ubuntu.com/community/LostPassword  )
hope that helps
0
 
LVL 10

Expert Comment

by:Scott Thomson
ID: 40031352
hey buddy :)

This should help you
You will need to make a Linux live cd (which is also the standard Ubuntu cd these days)

https://www.youtube.com/watch?v=bhbRgyb3Ois
0
 
LVL 8

Expert Comment

by:Surrano
ID: 40031626
Re stergium's comment: if the mount command doesn't work that way, try this instead:

mount -o remount,rw /

but I recommend accepting stergium's comment as final solution, assuming it helps of course :)
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:Lev Seltzer
ID: 40031917
stergium: I was able to enter the password and can now authenticate. However, I am able to login without entering a password. Is there a way to change this? I used the "user settings" to change my password, but I am still able to login without a password.
0
 
LVL 8

Expert Comment

by:Surrano
ID: 40032340
Can you edit your /etc/shadow file?
boot in single user mode to be safe
vi /etc/shadow
copy one non-empty encrypted password of a user (whose password you know) to root's entry.
save, exit, reboot.
This known password should be the only way to login as root.
0
 

Author Closing Comment

by:Lev Seltzer
ID: 40041363
First answer worked. Follow-ups were getting too complicated for me. Thanks for all the help.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question