Reset Linux Password To Log Into Gateway Command Line

Updated 7 months ago by admin

You will need physical access to your Gateway server with a keyboard and monitor. If you have installed USS Gateway on a virtual machine, you will need access to the console. This method won't work if you're using PuTTY.

To reset the root password:

  1. Reboot the USS Gateway server and press left shift key and escape repeatedly after the POST screen has disappeared. This should trigger the GRUB boot loader menu to appear, which will look like the example below.
  2. 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 word linux, then press Ctrl+e to move the cursor to the end of the line. It should look like the example below.
  3. 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.

  1. Now press Ctrl + X to boot the system with the modified setting. After a few moments, a simple prompt should appear:
  2. Now type the following:
mount -o remount,rw /
  1. Type
passwd root

and enter a new root password when prompted:

  1. 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:

  1. Once you have done that, type
sync

You will now be able to login into the command line with your new password.


How did we do?