Syed Jahanzaib Personal Blog to Share Knowledge !

December 2, 2011

Ubuntu Howto change ROOT password after fresh installation


Howto Recover User Forgotten Password  [ UBUNTU  12.x ]

1. Reboot your ubuntu computer
2. Hold shift during boot to start GRUB menu
3. Highlight your image and press ‘e’ to edit
4. Find the line starting with linux and append init=/bin/bash at the end of that line
5. Press ctrl-x to boot.
6. Type in passwd username
7. Set your password.
8. Type in reboot

2# Howto enable ROOT access in Ubuntu after fresh installation

When you install fresh Ubuntu, you can login via normal user account , & root access is not enabled by default  . In Ubuntu , root ID is created without predefined password, it does not have a password, but it does not have an empty password either , ggrrrrrrr Although you can use sudo command (which is also a kind of failsafe to prevent accidentally execution of unwanted mistakes or commands) to execute any task that requires root access, but still if you are doing some administrative related work, its a bit annoying to use sudo before every command.

To assign/change  root password , use the following command at terminal

sudo passwd root

It will ask you to enter current user password, enter it and then it will ask you to enter new root password two times, enter your desired password. Now you can login to root by


It will ask you to enter root password, simply enter password that you set in above step.

… OR …

Alternate method is following …

Use below command to switch to shell world

sudo sh

It will ask you the default current user password, just enter your password and press Enter and you will be presented with # sign.

Now enter this command to change the root password.

passwd root

Now enter your new password for user root twice and now you can login to root by using your newly created password by using . . .

su root



Syed Jahanzaib

Howto solve Ubuntu 9/10 apt-get not updating error

Filed under: Linux Related — Tags: , , , , — Syed Jahanzaib / Pinochio~:) @ 11:03 AM

If you are STILL using UBUNTU 9.10 [Karmic Koala], in which updates are not supported anymore, & It will refuse to Update / install any new app using apt-get, BUT you can still use it by adding following repositories in /etc/apt/sources.list

Remove all older lines and add the following lines in /etc/apt/sources.list using nano or gedit whatever you like.

For Ubuntu Ver 9 Karmic koala

deb karmic main  restricted
deb-src karmic main  restricted
deb karmic-updates main restricted
deb-src karmic-updates main  restricted
deb karmic universe
deb-src karmic universe
deb karmic-updates universe
deb-src karmic-updates universe
deb karmic multiverse
deb-src karmic multiverse
deb karmic-updates multiverse
deb-src karmic-updates multiverse
deb karmic-security main restricted
deb-src karmic-security main restricted
deb karmic-security universe
deb-src karmic-security universe
deb karmic-security multiverse
deb-src karmic-security multiverse

After changing the sources list, first update apt.

apt-get update

then try installing any package , for example.

atp-get install openssh-server

It should work fine.



# deb cdrom:[Ubuntu-Server 10.04.3 LTS _Lucid Lynx_ - Release i386 (20110719.2)]/ lucid main restricted
deb lucid main restricted
deb-src lucid main restricted
deb lucid-updates main restricted
deb-src lucid-updates main restricted
deb lucid universe
deb-src lucid universe
deb lucid-updates universe
deb-src lucid-updates universe
deb lucid multiverse
deb-src lucid multiverse
deb lucid-updates multiverse
deb-src lucid-updates multiverse
deb lucid-old-releases main restricted
deb-src lucid-old-releases main restricted
deb lucid-old-releases universe
deb-src lucid-old-releases universe
deb lucid-old-releases multiverse
deb-src lucid-old-releases multiverse


%d bloggers like this: