Solved

Password issue with Ubuntu

Posted on 2014-04-30
6
761 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Samba Question 11 139
Setup Ubuntu 16.04 to use LDAP for user login and authentication 2 278
SMTP log file for IMSVA 5 76
How many users could squid support? 21 63
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

710 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