0

I recently installed Ubuntu 14.04. I am not able to install any software because it is not accepting my password.

However I am able to log in to my account using the same password on my pc.

  • 2
    How are you attempting to install software? Is message asking for authentication asking for your password or for root's password? If you have enabled root account for some reason, it may have a different password than your primary password. This would only be the case if you explicitly created a root password at some point. There's no "default root password". – MGodby Oct 10 '14 at 12:43

1 Answers1

0

The user you are trying to install software with must be in the group "sudo" on a Ubuntu-system to be allowed to execute commands as root via sudo.

This is the case for the user created during installation but for any further user you need to explicitly grant administrative rights during creation.

If you did not, login with the adminstrative user and on a terminal, enter sudo usermod -a -G sudo [username].

If you lost the password for the probably only user with administrative rights, you can reset booting directly to /bin/bash. To achieve this, hold "shift" during boot. This will cause grub to display its menu. On the default entry, type e.

There should a line starting with linux similar to the following:

linux   /boot/vmlinuz-3.13.0-37-generic root=UUID=4be10ae8-1a19-485a-a24a-bde836584090 ro  quiet splash $vt_handoff

At the end, append init=/bin/bash and remove quiet splash $vt_handoff so it looks like:

linux   /boot/vmlinuz-3.13.0-37-generic root=UUID=4be10ae8-1a19-485a-a24a-bde836584090 ro init=/bin/bash

Then press Ctrl+X and your system will boot but instead of starting services like your graphical environment you will be dropped to a shell. You now need to mount / in read-write-mode as it is only mounted in read-only-mode and then you can set the new password for any user:

mount -o remount,rw /
passwd [username]
  [you'll be prompted to enter the new password twice]
sync
mount -o remount,ro /
reboot -f
Christian
  • 361
  • 1
  • 6