Changing Ubuntu Root Password: Difference between revisions

From RSWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
when the first installation screen appears press ''CTRL+F2'' to bring up another terminal and press Enter to activate it.
when the first installation screen appears press ''CTRL+F2'' to bring up another terminal and press Enter to activate it.


Create a mount point by entering '''''mkdir /mnt'''''
Create a mount point by entering the following:


If you don't know the partition that you want to mount then enter the command '''''cat /proc/partitions'''''
mkdir /mnt
 
If you don't know the partition that you want to mount then enter the command:
 
cat /proc/partitions


For my example the root file system is installed on /dev/sda3
For my example the root file system is installed on /dev/sda3


Now mount your root file system to the new mount point by entering the command mount '''''/dev/sda3 /mnt'''''
Now mount your root file system to the new mount point by entering the command:


Now we need to change the root file system to the newly mounted one and this is done by entering the command '''''chroot /mnt'''''
mount /dev/sda3 /mnt
 
Now we need to change the root file system to the newly mounted one and this is done by entering the command:
 
chroot /mnt


Once you are at the command prompt you can now enter the '''''passwd''''' command to change the root password.
Once you are at the command prompt you can now enter the '''''passwd''''' command to change the root password.
[[Category:Linux| ]]

Latest revision as of 11:52, 27 October 2018

Boot from the Ubuntu Install CD.

when the first installation screen appears press CTRL+F2 to bring up another terminal and press Enter to activate it.

Create a mount point by entering the following:

mkdir /mnt

If you don't know the partition that you want to mount then enter the command:

cat /proc/partitions

For my example the root file system is installed on /dev/sda3

Now mount your root file system to the new mount point by entering the command:

mount /dev/sda3 /mnt

Now we need to change the root file system to the newly mounted one and this is done by entering the command:

chroot /mnt

Once you are at the command prompt you can now enter the passwd command to change the root password.