When you start the Linux Operating System, a screen will appear as shown below:
On this screen press e to edit commands before booting.
Hitting e will take you to the following screen. Here you
have to make sure that kernel is highlighted, press up and down arrows
keys to navigate through the menu and highlight the kernel mode and when the kernel mode is highlighted press e again.
It will take you to the following screen. On this screen just
type single as shown below.
This will again take you to the previous screen where you
pressed e but this time you have to press b in order to boot.
Now hitting ‘b’ will take you the following screen, on this
screen first to crack the root password type passwd then it will ask you a
new password, type a new password and then retype it, after this it will show
you the message All authentication tokens updated successfully this means you
have successfully changed the password of root.
Now we have to add another user and set a password. In order
to accomplish this task we need to know the two commands highlighted below.
First type the command useradd and after space type the name you want to give the
user just like shown below, I have given the name os, this command will
create a user you specified. Now to set a password of the user type passwd and name of the user you want to set a password to, just like highlighted
below. This will successfully set a password and will show you a message All
authentication tokens update successfully. In the end type init 6 to restart
the system.
You
can see that a user has been created with the name of os. Click this user and
provide the password we set to it.
No comments:
Post a Comment