PC Help Forum - Free Computer Help, Windows, Hardware, Software and more!
 
Become a Member Today!
Search PC Help Forum for Answers
 
Go Back   PC Help Forum - Free Computer Help, Windows, Hardware, Software and more! > Operating Systems > Other OS
Other OS - Ubuntu Password posted in the Operating Systems forums; Iv recently installed ubuntu and on the first boot forgot my Username and Password. Is there anyway of retrieving that data or getting around it and changing them to something ...

REGISTER NOW to remove these Ads

Reply
 
LinkBack Thread Tools Display Modes Language
  #1  
Old 02-02-2008
Ryanzilla244's Avatar
Bronze Member
My PC
 
Posts: 73
PC Experience: In The Mix
Location: UK
Ryanzilla244 - See this Members User comments on their Profile page
Send a message via MSN to Ryanzilla244
Question Ubuntu Password

Iv recently installed ubuntu and on the first boot forgot my Username and Password.

Is there anyway of retrieving that data or getting around it and changing them to something else.

Thanks in advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #2  
Old 02-03-2008
Jelly Bean's Avatar
Tech Support Team
My PC
 
Posts: 2,385
PC Experience: Experienced
Location: Swansea
Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page
Send a message via MSN to Jelly Bean Send a message via Yahoo to Jelly Bean Send a message via Skype™ to Jelly Bean
Default

Get a floppy or cd-rom bootable version of Linux such as knoppix. Boot that; then mount the hard drive such as #mount /dev/hda1 /mnt
Edit the /etc/password file for the user which will now be located as:
/mnt/etc/password. You might also need to remove (blank) the password entry for that user in /etc/shadow. You should b able to boot the original Linux and login.

First, the file is called /etc/passwd, not /etc/password. You should see your account name in the results of "tail /etc/passwd".

If Ubuntu uses GRUB, and I'm reasonably sure it does, all you have to do is press "e" when it briefly pauses before booting. You will then be able to edit the boot options. Go to the end of the line and enter "init=/bin/bash". This will bypass all startup procedures and give you root access. Run the "tail /etc/passwd" command I mentioned earlier to identify your username. Your root filesystem will be mounted readonly, so you'll want to run "mount -o remount,rw /". Then set your password with "passwd yourusername". It's possible to password protect GRUB. If you encounter this, use Paracomp's method. You will need to edit etc/shadow. If you completely remove the longest string of junk between two colons, your password will be removed. Reboot, login, and set a new password with "passwd".


Here is how you can use the Live CD to change the administrative password on your machine if you have lost/forgot the current password.
Note that you can usually just boot into "Recovery Mode" and run the passwd command directly.
  1. Boot the Ubuntu Live CD.
  2. Press Ctrl-Alt-F1
  3. sudo mount /dev/hda1 /mnt
  4. Depending on your machine it could also be sudo mount /dev/sda1 /mnt. If you created a custom partition layout when installing Ubuntu you have to find your root partition using the fdisk utility. See the section Finding your root partition.
  5. sudo chroot /mnt
You can now use the passwd command to reset a password.
Note: In the mount command, /dev/hda1 will need to be replaced with the partition where the root of the file system resides.


If you install some other system and lose the grub.
  1. Boot the Ubuntu Live CD.
  2. Press Ctrl-Alt-F1
  3. Find the partition where your /boot directory is (normally the root partition) check the previous tip for that.
  4. sudo mount /dev/hda1 /mnt
  5. sudo chroot /mnt
  6. grub
  7. find /boot/grub/stage1 (will output a partition name like (hd0,3) )
  8. root (hd0,3)
  9. setup (hd0)
  10. quit
  11. Now restart the system and remove the Live CD
  12. Well, this tutorial will help you reset your Ubuntu user account password, regardless of what reason you have for resetting it.
    First, you have to reboot into recovery mode.

    If you have a single-boot (Ubuntu is the only operating system on your computer), you may have to press the Escape key during bootup in order to see the boot menu. If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to press the Escape key.

    From the boot menu, select recovery mode, which is usually the second boot option. Recovery mode will log you into a terminal with the root account. The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.
    If you have forgotten your username as well, type
    ls /home
    That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset Cynthia Heimel's password. To reset the password, type
    passwd username
    where username is the username you want to reset. In this case, I want to reset Cynthia's password, so I type passwd cynthia

    You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again. Now the password should be reset. Type
    reboot
    to reboot your computer.
    Now that your password is reset, you can boot into normal (not recovery) mode and use Ubuntu as you normally would—only this time, you actually know the password!
MMMMMMMMM,Posted a reply,any good for you?


Last edited by Cowburn199 : 02-03-2008 at 01:14 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old 02-03-2008
Ryanzilla244's Avatar
Bronze Member
My PC
 
Posts: 73
PC Experience: In The Mix
Location: UK
Ryanzilla244 - See this Members User comments on their Profile page
Send a message via MSN to Ryanzilla244
Default Re: Ubuntu Password

Thank you very much, it looks like you put loads of time in to that.

Cheers.

Ill get on it.

Thanks again.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old 02-03-2008
Jelly Bean's Avatar
Tech Support Team
My PC
 
Posts: 2,385
PC Experience: Experienced
Location: Swansea
Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page
Send a message via MSN to Jelly Bean Send a message via Yahoo to Jelly Bean Send a message via Skype™ to Jelly Bean
Default Re: Ubuntu Password

Your welcome,I hope it helps,come back any time for any more help if you require it.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old 02-03-2008
Ryanzilla244's Avatar
Bronze Member
My PC
 
Posts: 73
PC Experience: In The Mix
Location: UK
Ryanzilla244 - See this Members User comments on their Profile page
Send a message via MSN to Ryanzilla244
Default Re: Ubuntu Password

KK, cheers mate, Very knowledgeable.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old 02-03-2008
Jelly Bean's Avatar
Tech Support Team
My PC
 
Posts: 2,385
PC Experience: Experienced
Location: Swansea
Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page
Send a message via MSN to Jelly Bean Send a message via Yahoo to Jelly Bean Send a message via Skype™ to Jelly Bean
Default Re: Ubuntu Password

I am a miss lol.(female).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old 02-03-2008
Ryanzilla244's Avatar
Bronze Member
My PC
 
Posts: 73
PC Experience: In The Mix
Location: UK
Ryanzilla244 - See this Members User comments on their Profile page
Send a message via MSN to Ryanzilla244
Default Re: Ubuntu Password

I apologise, il start again.

Cheers person. Your very knowledgeable.

I am grateful though thanks.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old 02-03-2008
ih8bills's Avatar
US Mule
My PC
 
Posts: 3,586
PC Experience: More Stubborn than any PC
Location: coastal Rhode Island
ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page
Default Re: Ubuntu Password

Originally Posted by jelly bean View Post
I am a miss lol.(female).
Welcome, Miss.
Nice to have someone with good Linux knowledge--
I know we have one or two staff with Linux experience... but to Linux I am a total newbie

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old 02-04-2008
Jelly Bean's Avatar
Tech Support Team
My PC
 
Posts: 2,385
PC Experience: Experienced
Location: Swansea
Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page Jelly Bean - See this Members User comments on their Profile page
Send a message via MSN to Jelly Bean Send a message via Yahoo to Jelly Bean Send a message via Skype™ to Jelly Bean
Default Re: Ubuntu Password

Thanx ih8bills,I,m still learning but getting a bigger brain matter each day LOL.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old 02-04-2008
ih8bills's Avatar
US Mule
My PC
 
Posts: 3,586
PC Experience: More Stubborn than any PC
Location: coastal Rhode Island
ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page ih8bills - See this Members User comments on their Profile page
Default Re: Ubuntu Password

Originally Posted by jelly bean View Post
Thanx ih8bills,I,m still learning but getting a bigger brain matter each day LOL.
We're all still learning-- nobody knows everything.
It is a never-ending process--until that final end, anyway.
I learn something new here every time I log on.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!