Last updated 11th October 2018
Objective
To perform certain administrative functions on your server (e.g. installing packages), you'll need to have a high level of user access. On Linux servers, this access is called "root".
This guide will show you how to become the root user and create a password for the root account.
Requirements
- a Public Cloud project activated
- access to the OVH Control Panel
Instructions
This guide assumes that the default user is called 'admin'.
Changing the root password
First, establish an SSH connection to your server.
At the command line, enter a password for the admin user (for security reasons, the password will not be shown as you type it):
~$ sudo passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated
successfully
Update repositories (Debian/Ubuntu)
To update the installed software packages on your server, type the following command at the command line:
~$ sudo apt-get update
Update the system (CentOS/Fedora)
To update your server's operating system, type the following command at the command line:
~$ sudo yum update
Edit a configuration file
~$ sudo vi /etc/hosts.allow
Become root
To become the root user, type the following command at the command line:
~$ sudo su -
~#
Next, enter the root password.
Go further
Join our community of users on https://community.ovh.com/en/.
Did you find this guide useful?
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.