0

I just bought my new HP laptop and the OS is Ubuntu. It never asked for my password when I first used it and I never made one. Every time I try to add or download stuff it always asks for my password that I never made. Please help me.

2
  • That's definitely not normal. On the Desktop, do you see an icon that says "Prepare for shipping to end user"?
    – John Scott
    Jul 28, 2014 at 3:15
  • Did you buy it off the display? Jul 28, 2014 at 3:55

2 Answers 2

1

You could try opening a terminal window by Ctrl+ Alt+ T and run following command:

passwd

And for root:

sudo passwd

If there was no password set, you can enter a new one.

But I think it is not possible to setup Ubuntu without a password, maybe autologin is enabled, or factory setup was not finished successfully.

1
  • Thanks for editing Pandaya, I am relatively new to askubuntu, even though beeing signed for up some time now.
    – Flatron
    Jul 29, 2014 at 5:30
1

Try this method:

From this source: http://www.howtogeek.com/howto/linux/reset-your-ubuntu-password-easily-from-the-live-cd/

You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.
Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:

sudo fdisk -l

This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.

Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.

sudo mkdir /media/sda

The next command will mount the hard drive in the /media/sda1 folder.

sudo mount /dev/sda1 /media/sda1

Now it’s time for the command that actually does the magic: chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.

sudo chroot /media/sda1

Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

passwd geek

Note that you’ll have to type your username after the passwd command in order to change the right password.

Now you should be able to reboot your system and log yourself in with your new password.

It's worked for me.

3
  • 2
    Could you please add in your answer the relevant portion of your link as suggested by AskUbuntu help
    – Boris
    Jul 28, 2014 at 7:16
  • Is there's still something wrong?
    – adjstts
    Jul 28, 2014 at 10:35
  • good job => so +1
    – Boris
    Jul 29, 2014 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .