Solved

Password issue with Ubuntu

Posted on 2014-04-30
6
756 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
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.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

763 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