In: Computer Science
Question 1: Your Company's Linux guru has just been fired. He is the only person who knows the root password. He refuses to tell anyone what that password is. Your boss has given you the task of changing the root password on all the Linux machines. You have physical access to all the machines.
Explain exactly how you would change all the Linux root passwords on all the companies Machines.
Answer)
To change the root password on the Linux machines when you do not have the password, but is having physical access to the machine, the process would be:
a) Access each machine separately and do the following
b) Boot into the Linux Live system using Linux DVD or flash drive
c) Once system is on, go to terminal, type – sudo su, which will take to the root
d) Mount partition of disk on the /etc directory of the installed system (for example /dev/sda2) as:
mkdir /tmpmnt; mount /dev/sda2 /tmpmnt
e) The command will mount the system root in the /tmpmnt directory
f) Type command passwd root, and enter password and remember it
g) From the /etc/shadow path, retrieve the hashed password
h) Set the hashed root password by replacing that with the one in the step g
i) Then reboot the system and enter the password entered in Step f
The password should be changed and user should be able to login.
We have to do this physically on all the computers.