LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-16-2007, 01:25 PM   #1
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Rep: Reputation: 0
password


Okay I'm new at using ubuntu linux and I don't go on my computer much. I have forgotten my password is there anyway to get it back or find out what it is? Any help would be great. Thanks
 
Old 07-16-2007, 02:12 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Boot from any "live CD" Linux. If you have a recent Ubuntu version, you may already have this. Otherwise, there are many options, including Knoppix.

Once you are running, you will need to open a terminal, find the Linux partition (on the hard drive, not the virtual partition created by the live install) which contains the /etc directory, and edit the "passwd" file. Find the line containing your user name, and remove the "x" following the first colon. The modified file will look something like this:
mherring::1001:100::/home/mherring:/bin/sh

Save the file and re-boot, and you will be able to log in with no password.

If you need more details--eg on how to find the right partition--let us know
 
Old 07-22-2007, 03:30 AM   #3
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Ok so I finally found a live cd that works. And I have tried to find the right partition but I can not do it! So if someone could help me kinda step by step it would be freaking awesome. Wow I never thought it would get so manning to do something like this!!! Maybe now I will always remeber my password..lol
 
Old 07-22-2007, 04:53 AM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Can you show us the output of 'fdisk -l'?

edit: just in case you had problems:

1. Go to Applications => Accessories => terminal
2. type: sudo fdisk -l
It'll show you all your harddrives and partitions

Last edited by sycamorex; 07-22-2007 at 05:06 AM.
 
Old 07-22-2007, 01:22 PM   #5
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Ok I did that and I am trying to get into the linux hard drive and it keeps telling me I am unable to open it??? What do I do now?
 
Old 07-22-2007, 01:36 PM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
What exactly are you doing? And what exactly does it say?
 
Old 07-22-2007, 01:39 PM   #7
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
I am trying to change or get my password and I type in sudo fdisk -l and it comes up with the list of my partitions. I need to get in to the first one which says /dev/hda1 So I can change my password on it. When I type in that command it says unable to open or access denied.
 
Old 07-22-2007, 01:51 PM   #8
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
ok type the following:

sudo makedir temporary
sudo mount -t ext3 /dev/hda1 temporary
sudo gedit temporary/etc/passwd

it should open the file you want to modify
 
Old 07-22-2007, 02:05 PM   #9
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
I have to do it from a live cd. I could not log into my computer because I forgot my password. I have booted from the live cd and everything. So yea....
I typed in what you said it came up with this

ubuntu@ubuntu:~$ sudo makedir
sudo: makedir: command not found
ubuntu@ubuntu:$~ sudo makedir temporary
sudo: makedir: comand not found
ubuntu@ubuntu:$~ sudo mount -t ext3 /dev/hda1 temporary
mount: mount point temporary does not exit
so i have to get onto the linux partition from the live cd and change my password from here. I cannot get it.
 
Old 07-22-2007, 02:08 PM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The command to create a directory is mkdir.
 
Old 07-22-2007, 02:14 PM   #11
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
okay I did that and it came up ass

ubuntu@ubuntu:$~ mkdir
mkdir: missing operand
try 'mkdir --help' for more information.
 
Old 07-22-2007, 02:18 PM   #12
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Quote:
The command to create a directory is mkdir
.

ooops, sorry

should be:
mkdir temporary
 
Old 07-22-2007, 02:23 PM   #13
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by almightyme
okay I did that and it came up ass

ubuntu@ubuntu:$~ mkdir
mkdir: missing operand
try 'mkdir --help' for more information.
You obviously need to tell it what directory you want to create..
 
Old 07-22-2007, 02:28 PM   #14
almightyme
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pixellany
Boot from any "live CD" Linux. If you have a recent Ubuntu version, you may already have this. Otherwise, there are many options, including Knoppix.

Once you are running, you will need to open a terminal, find the Linux partition (on the hard drive, not the virtual partition created by the live install) which contains the /etc directory, and edit the "passwd" file. Find the line containing your user name, and remove the "x" following the first colon. The modified file will look something like this:
mherring::1001:100::/home/mherring:/bin/sh

Save the file and re-boot, and you will be able to log in with no password.

If you need more details--eg on how to find the right partition--let us know
Okay so I did that now it didn't work....because I just tried to long in. So maybe I didn't do something right.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 05:11 AM
kdesu gives incorrect password error with correct password. dasy2k1 SUSE / openSUSE 1 04-16-2007 11:34 AM
change Root Password even if the password in the grub is also set sheelnidhi Linux - General 6 08-30-2006 08:27 AM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration