Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property ACF::$fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php on line 138

Deprecated: Creation of dynamic property acf_loop::$loops is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 28

Deprecated: Creation of dynamic property ACF::$loop is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 269

Deprecated: Creation of dynamic property ACF::$revisions is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 397

Deprecated: Creation of dynamic property acf_validation::$errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 28

Deprecated: Creation of dynamic property ACF::$validation is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 214

Deprecated: Creation of dynamic property acf_form_customizer::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 28

Deprecated: Creation of dynamic property acf_form_customizer::$preview_fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 29

Deprecated: Creation of dynamic property acf_form_customizer::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 30

Deprecated: Creation of dynamic property ACF::$form_front is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 598

Deprecated: Creation of dynamic property acf_form_widget::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 34

Deprecated: Creation of dynamic property acf_form_widget::$preview_reference is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 35

Deprecated: Creation of dynamic property acf_form_widget::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 36

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-wp-migration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp_plugin/wp_plugin.php on line 23

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 54

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1539

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 828

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property acf_field_oembed::$width is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 31

Deprecated: Creation of dynamic property acf_field_oembed::$height is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 32

Deprecated: Creation of dynamic property acf_field_google_map::$default_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-google-map.php on line 33

Deprecated: Creation of dynamic property acf_field__group::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php on line 31

Deprecated: Creation of dynamic property acf_field_clone::$cloning is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 34

Deprecated: Creation of dynamic property acf_field_clone::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 35

Deprecated: Creation of dynamic property jh_acf_field_table::$settings is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-table-field/class-jh-acf-field-table.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":24472,"date":"2016-10-19T14:26:54","date_gmt":"2016-10-19T11:26:54","guid":{"rendered":"https:\/\/upcloud.com\/community\/tutorials\/reset-root-password-cloud-server"},"modified":"2016-10-19T14:26:54","modified_gmt":"2016-10-19T11:26:54","slug":"reset-root-password-cloud-server","status":"publish","type":"tutorial","link":"https:\/\/studiogo.tech\/upcloudold\/tutorial\/reset-root-password-cloud-server\/","title":{"rendered":"How to reset root password on Cloud Server"},"content":{"rendered":"\n

Strong system security requires equally strong passwords, which, in turn, make the passwords more difficult to remember. In such case that the password for the Linux root user account is lost without an alternative sign-in method like an SSH key<\/a>, you might end up locked out of your own system. Luckily, resetting the root password of your cloud server is fairly straightforward and will only take a few minutes to complete.<\/p>\n\n\n\n

\n
Test hosting on UpCloud!<\/a><\/div>\n<\/div>\n\n\n\n

Deploying a temporary Linux host<\/h2>\n\n\n\n

To gain access to your old root account, you will need to be able to boot a system to a command line. A common way to do this for Linux computers is to boot into the GRUB menu, but this might prove slightly difficult on cloud servers where you have no physical access to the system. Instead, you can take advantage of the virtual nature of the cloud environment and simply create a new server to mount the old disk device in.<\/p>\n\n\n\n

Start by logging into your UpCloud control panel and deploying a new server<\/a>.<\/p>\n\n\n\n

    \n
  1. Select the same availability zone as your old server.<\/li>\n\n\n\n
  2. Pick a configuration, the smallest is fine.<\/li>\n\n\n\n
  3. Select whichever Linux distribution you wish. Usually, it is easiest to use the same OS as your old system.<\/li>\n\n\n\n
  4. Add your SSH keys. Not highly important as you will only need to log in once.<\/li>\n\n\n\n
  5. Use a simple initialization script to shut down the server after the first boot. It will save you some time as the server must be powered down to make changes to the storage.\n
    shutdown -h 1<\/pre>\n
    \"Script<\/figure>

    <\/p>\n<\/li>\n\n\n\n

  6. Once the setup is ready, click the Deploy <\/i>button at the bottom of the page.<\/li>\n<\/ol>\n\n\n\n

    The deployment process will only take a moment, but you do not have to wait for it to complete. Continue below with the next part.<\/p>\n\n\n\n

    Moving the old system disk to the temporary host<\/h2>\n\n\n\n

    In the meanwhile, as your new server is being deployed, shut down your old server at the control panel. If the server was installed using a custom system image, you may need to use the forced shutdown command.<\/p>\n\n\n\n

    We recommend taking a backup of your server before resetting the root password<\/a><\/h4>\n\n\n\n

    With the server shut down, go to the Storage<\/em> tab in your server settings.<\/p>\n\n\n\n

    Make sure the storage device is named so that you will be able to recognise it later. You can rename the device by clicking the pencil<\/i> icon, entering a new name, then clicking the accept icon and afterwards the Save changes<\/em> button to confirm.<\/p>\n\n\n\n

    \"Rename<\/figure>\n\n\n\n

    Then, free up the OS disk device from the host by clicking the Detach<\/em> button. If you have multiple disks, leave the other devices as they are. When attaching the OS disk again after the password reset, it will be set correctly as the first device.<\/p>\n\n\n\n

    \"Detach<\/figure>\n\n\n\n

    Next, open the server settings of the temporary server and go to the Storage<\/em> tab there.<\/p>\n\n\n\n

    Click on the Add new device<\/em> button at the end of the storage list.<\/p>\n\n\n\n

    In the new storage device window, select Attach existing device<\/em>, then find the device you just detached in the Devices list<\/em>. Once you have selected the right disk, click the Add a storage device<\/em> button underneath to confirm.<\/p>\n\n\n\n

    \"Attach<\/figure>\n\n\n\n

    When the disk has been attached successfully, boot up the server and log in over SSH with the root user of the temporary host.<\/p>\n\n\n\n

    Resetting the root password<\/h2>\n\n\n\n

    When logged into the temporary server, check that you can see the old system disk.<\/p>\n\n\n\n

    lsblk\n\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nvda 253:0 0 25G 0 disk\n\u2514\u2500vda1 253:1 0 25G 0 part \/\nvdb 253:16 0 25G 0 disk\n\u2514\u2500vdb1 253:17 0 25G 0 part<\/pre>\n\n\n\n

    The first device vda<\/em> in the above example is the system disk running the temporary server and the second vdb<\/em> is your original system device. To access the second storage, you will need to mount it in the running system.<\/p>\n\n\n\n

    mount \/dev\/vdb1 \/mnt<\/pre>\n\n\n\n

    Then change to the root environment of the original system.<\/p>\n\n\n\n

    chroot \/mnt<\/pre>\n\n\n\n

    You can now change the root password with the usual command. Enter the new password twice to confirm.<\/p>\n\n\n\n

    passwd<\/pre>\n\n\n\n

    Once you have reset the password, exit the mounting system and shut down the temporary host so that you can return the old system disk where it belongs.<\/p>\n\n\n\n

    exit\n\nshutdown -h now<\/pre>\n\n\n\n

    Returning the system storage<\/h2>\n\n\n\n

    When the temporary server has been powered down, you can detach the system device original in the server settings and Storage tab as you did before. Then reattach it to its original host.<\/p>\n\n\n\n

    \"Storage<\/figure>\n\n\n\n

    Then start the original server again.<\/p>\n\n\n\n

    You should now be able to log in using the root account with the password you just set and gain normal access to your server.<\/p>\n\n\n\n

    After confirming that the password was reset successfully, the temporary server and storage device can be deleted.<\/p>\n\n\n\n

    \"Delete<\/figure>\n","protected":false},"featured_media":27304,"comment_status":"open","ping_status":"closed","template":"","community-category":[109,121],"class_list":["post-24472","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-upcloud-services","community-category-security"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24472"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/27304"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24472"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}