Forgotten password from the system and admin interface

Sometimes it may happen then the password is lost, forgotten or just doesn’t fit. The situation can be fixed in such a way:

There are two passwords: 1. From OS (in the command line interface)

../_images/linux_faq_rest_password.png
  1. And the password from the web interface where you work with StaffCop.

../_images/linux_faq_rest_password_2.png

Linux password

First method

There is a number of ways to restore lost OS password, the easiest way is to boot from the same disk you used for installing the system and to reset it with the tools of the installer.

Boot from the boot image and chose /”restore the system/” in the menu.

../_images/linux_faq_rest_password_3.png

follow the tips of the installer until you enter the console.

then run the command

sudo passwd youruser - change “youruser” to your username

then input and confirm the new password.

if you don’t know your user name you can learn it in such a way:

cat /etc/passwd
../_images/linux_faq_rest_password_4.png

your user will have id 1000 and higher and will be situated on the lowest line.

those with id less than 1000 are situated higher as they are the system users, they require no changes.

Second method

Press “Shift” just after loading of BIOS of your system or virtual machine until you see the output similar to that on the screenshot below

../_images/recovery_mode_1.PNG

Then choose “Recovery Mode” and wait until you see the following menu:

../_images/recovery_mode_2.PNG

Choose “root”:

../_images/recovery_mode_3.PNG

From root-console, we will run THREE commands:

  • Mount the file system in the writing mode

  • Change password for user support

  • And reboot the virtual machine:

mount -o remount,rw /
passwd support
reboot
../_images/recovery_mode_4.PNG

Reset password from admin panel

To restore/change the web interface password you should run the following command in console

sudo staffcop passwd yourpassword

change “yourpassword” to the password you need

This will be the new password for the superuser called admin