LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 04-02-2016, 12:13 PM   #1
blueriver649
LQ Newbie
 
Registered: Sep 2015
Posts: 4

Rep: Reputation: Disabled
Forgetting Password !


Hi Everybody,

I am able to log in my Ubuntu 15.1 system but I don't remember my password, is there anyway to retrieve my password, Thanks.
 
Old 04-02-2016, 12:55 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
No, but there are ways to change it. There is a number of threads on these very forums about it.
 
Old 04-02-2016, 03:46 PM   #3
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
blueriver649,

Look here:

http://blog.zwiegnet.com/linux-serve...rd-linux-mint/
 
Old 04-05-2016, 02:18 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
the previous link seems very specific;
the general solution is: boot into single user or "recovery" or "mantenance" mode, and set a new password with
Code:
passwd <yourusernamehere>
or
Code:
passwd root
 
1 members found this post helpful.
Old 04-05-2016, 06:44 AM   #5
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by blueriver649 View Post
Hi Everybody,

I am able to log in my Ubuntu 15.1 system but I don't remember my password, is there anyway to retrieve my password, Thanks.
are u logging in with your user account, and forgot root password?
or
are u logging in as root, because u forgot your user password?

Please be more specific.
 
1 members found this post helpful.
Old 04-05-2016, 10:14 AM   #6
pepe41695
LQ Newbie
 
Registered: Aug 2013
Location: Niğde/Turkey
Distribution: Slackware-current
Posts: 6

Rep: Reputation: Disabled
Hello,

Boot your pc from any linux distro. Then create a folder and mount the root partition this folder. For example;

mkdir folder && mount /dev/sda2(root disk) folder && chroot folder/ bin/bash

create a new password with "passwd root" command.

Or

Change the hash value of root in "/etc/shadow" file, for example;

root:$5$m19gJi0/n$DubaLYUA05sIyfhKL4mHO94NIfhYdEi1455NEIAYO34:16886:0:::::

second section of this file is hash.

If you have one more user copy the other one of the users password hash value and change root hash value with this.

Or

Please change the hash value of rooot with $5$twfawRDZz2FuQq0$TLuTzpOxKP6PR9G9nejQfQBnEbX0sDvRAv4B2FKsPtB then reboot if it works your new password is "12345".


Last edited by pepe41695; 04-05-2016 at 10:43 AM.
 
Old 04-05-2016, 12:28 PM   #7
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
As long as you have root access or your personal account has sudo rights, changing a password is a piece of cake.
I tell everyone who admins a linux box to ensure their account has full sudo rights.

As root on CLI
Code:
 passwd <user> {who password you want to change}
As user on CLI with sudo access
Code:
sudo bash
su -
passwd {to change root's password}
passwd <user> {who password you want to change}
 
Old 04-05-2016, 06:48 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
I like pepe41695 suggestion but you'd have to be careful on any of the password changes. In some systems, many things might be tied to that exact password.

But if I had 15, I'd think about just loading the latest on it.
 
Old 04-06-2016, 12:17 PM   #9
blueriver649
LQ Newbie
 
Registered: Sep 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi Gents,

Thanks for your help, by using Lazydog's method. it worked perfectly but I will keep a copy of Pepe method in case I need it in the future.
 
Old 04-06-2016, 01:02 PM   #10
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
I've been doing it this way for years. As I hardly ever login as root I forget that password all the time.
 
Old 04-06-2016, 03:10 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Should have said that I liked that suggestion for it's uniqueness. Single mode is generally the posted solution.

Glad you got it fixed and for lazydog's solution.
 
Old 04-06-2016, 08:46 PM   #12
blueriver649
LQ Newbie
 
Registered: Sep 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks Jefro.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos- Forgetting password louk_88 Linux - Security 9 04-23-2012 08:18 AM
Ubuntu keeps forgetting my password. bensen408 Linux - Newbie 2 05-04-2008 07:22 PM
Donations- Who am I forgetting? macskeeball General 5 11-19-2006 11:54 PM
debian keeps forgetting my NIC chrull Linux - Hardware 0 04-22-2004 12:31 PM
'Open With...' forgetting Micro420 Mandriva 1 10-03-2003 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 01:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration