|
When you first receive your SmartMachine, you will need to change a few default passwords. The following is how to change them through the command line. If you intend to use Virtualmin to manage hosting for your SmartMachine, a good practice is to use the Virtualmin controls for password changing. This way, Virtualmin knows the passwords for your users and can use them as it goes. Otherwise, you may encounter a situation where a single user has a different password for system login, and for MySQL or SVN. This only applies to users created through Virtualmin (not the "root" or "admin" user). In this topic: |
At a Glance
This topic shows you how to change SmartMachine passwords, how to update. |
Please note, once you change any passwords, those will not update your machine credentials in your "my.joyentcloud.com" portal.
Changing Passwords
| You should change passwords on older cloud SmartMachines. If you use "my.joyentcloud.com" for your SmartMachines, the admin and root system accounts are secured with their system passwords locked. You can use this process to set the system passwords if you need to on a new Joyent cloud SmartMachine. |
Admin User
- Log into your SmartMachine over ssh.
- Run this command:
You will need to enter your current password that is supplied by Joyent and your new password.
Root User
- Log into your SmartMachine as the admin user
- Run this command:
You will only need to enter your new password.
MySQL Root User
- Log into MySQL:
The system will prompt you for your MySQL password that is supplied by Joyent.
- Once at the MySQL prompt, run this command:
MySQL should return something like this:
- Enter quit to exit.

Warning!
After exiting the MySQL command line interface, you should edit your .mysql_history file to remove the entry that shows your password.
Keep in mind
If you use webmin you also need to update the password there as well either through the webmin interface or editing /etc/webmin/mysql/config
Webmin User
To change a Webmin user password through the command line, run this command:
sudo /opt/webmin/changepass.pl /etc/webmin admin yournewpassword
| Keep in mind The path to changepass.pl may change as the version of webmin increases. In the example above its version 1.380. |
| Warning! After logging out and back in, you should edit your .bash_history file to remove the entry that shows your password. |
Disabling Password Authentication
If you prefer public key authentication and want to disable password authentication, do the following:
- Open the SSH daemon configuration file by running this command:
- Set both of these values to no
- PasswordAuthentication
- PAMAuthenticationViaKBDInt