Reset Linux Password To Log Into Gateway Command Line
To reset the root password:
- Reboot the USS Gateway server and press left
shift
key andescape
repeatedly after the POST screen has disappeared. This should trigger the GRUB boot loader menu to appear, which will look like the example below. - Press
e
to edit the first menu option. On the next screen, use the down arrow key to move to the line that starts with the wordlinux,
then pressCtrl
+e
to move the cursor to the end of the line. It should look like the example below. - Press the
space
bar to add a new space to the end of the line and then type
init=/bin/bash
It should look similar to the example shown below.
- Now press
Ctrl
+X
to boot the system with the modified setting. After a few moments, a simple prompt should appear: - Now type the following:
mount -o remount,rw /
- Type
passwd root
and enter a new root password when prompted:
- There is an additional username that was created during the installation of USS Gateway which is used to log into the command line. This is because the direct
root
login is now allowed. To find out what that username is, you can look in the password file by running the command
cat /etc/passwd
and then look at the last line - this will most likely be the username used for normal logins. You can then use the same method as above to reset that password too. In the example below, the standard username is dan
so the command passwd dan
would need to be run to reset it:
- Once you have done that, type
sync
You will now be able to login into the command line with your new password.