Solved

Password issue with Ubuntu

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CentOS 7 Installation 7 86
Linux script delete files 3 50
Linux Real Time Memory on Distinct 24 Cycle 7 29
trouble on installing syslog-ng on CentOS 7 7 56
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
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.:

838 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