Search


print PDF Ireland
What are the different passwords on my server? How to edit?

  • Introduction
Your dedicated server has a "super user" called root. This user has all rights and can change whatever he wants on the server. It is therefore very important to disclose the password to the minimum possible. On an OVH server, there are 3 applications that can use a root account:

- SSH An account can be used to fully administer your server through a shell
- Webmin This account is used to administer much of your server using a graphical interface,
- MySQL Where this account can access all databases and administer the MySQL server
.

Upon delivery of your server (under Redhat), you receive an email summary containing two passwords. The first is used for the root account via SSH and webmin, the second for MySQL.

Upon delivery, the passwords for SSH and webmin are synchronised perfectly but you can use a different password to log in as root in SSH than from the one you use to log on as root through webmin. Similarly, you may need for different reasons to modify any of these passwords.


  • SSH Access
To change the root password that you use to log into SSH, you must be logged in and use the SSH command passwd. The system then asks for the new password:

[root@julien /]# passwd
New password:
Retype new password:
passwd: all authentication tokens updated successfully


The last line indicates when the password has been changed successfully.
These changes do not affect the root password for webmin. Similarly, when you are logged in as root through SSH, you can change the password of any user of the server. This affects the password used by that user to log into SSH and / or FTP. The command is as follows (user represents the user's login):

[root@julien /]# passwd user


  • Webmin access
To change the root password that you use to connect via webmin, you must be logged into SSH and run this command:

[root@julien /]# /usr/libexec/webmin/changepass.pl /etc/webmin root new_password


new_password represents the new password of your choice that will be assigned to the root user.
These Changes will not affect the root password for SSH.

  • MySQL Access
To change the root password that you use to administer the MySQL server, you must be logged into SSH and run this command:

[root@julien /]# mysqladmin -p password new_password

Enter password: new_password represents the new password you want to be assigned to the root user. The system will then ask you to enter your root password, the current MySQL server then changes the password.

This error indicates that the password entered is wrong:

[root@julien /]# mysqladmin -p password new_password
Enter password:
mysqladmin: connect to server at 'localhost' failed


The root MySQL can be used to access all the databases hosted on your server from phpMyAdmin. The interface will then display the databases of each of your users. You can access it through the URL: http://nsXXXX.ovh.net/phpMyAdmin/ (nsXXXX.ovh.net is the name of your server).