phpvirtualbox is installed with a default loging user name and password: admin & admin
Is it possible to use commanline to change it to some other username and password.
I know we can do it using the gui but I need to do it programatically.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sure Linux has something similar if that's what you're using. Then set the password for your user:
VBoxManage setextradata global phpvb/users/myuser/pass eaa16b9ced0b5c6ece7aae07cb47c671e8c8f03bfe807f941809477a847337afc5e4335527dee93b083dfcf553042f69583067951ec812149b3fbeb98cb63891
Set the user as an admin:
VBoxManage setextradata global phpvb/users/myuser/admin 1
Let me know if you have any questions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
phpvirtualbox is installed with a default loging user name and password: admin & admin
Is it possible to use commanline to change it to some other username and password.
I know we can do it using the gui but I need to do it programatically.
Yes you can do this using the CLI. Use
VBoxManage getextradataandVBoxManage setextradata. E.g. to view the admin password:VBoxManage getextradata global phpvb/users/admin/passThere is no way to change a key. You'll have to delete it.
VBoxManage setextradata global phpvb/users/admin/adminVBoxManage setextradata global phpvb/users/admin/passThen generate a password for the user using sha512 encryption. On a Mac you can do this with the sha command:
[ian@laptop : ~]> echo "secret" | shasum -a 512 eaa16b9ced0b5c6ece7aae07cb47c671e8c8f03bfe807f941809477a847337afc5e4335527dee93b083dfcf553042f69583067951ec812149b3fbeb98cb63891 -I'm sure Linux has something similar if that's what you're using. Then set the password for your user:
VBoxManage setextradata global phpvb/users/myuser/pass eaa16b9ced0b5c6ece7aae07cb47c671e8c8f03bfe807f941809477a847337afc5e4335527dee93b083dfcf553042f69583067951ec812149b3fbeb98cb63891Set the user as an admin:
VBoxManage setextradata global phpvb/users/myuser/admin 1Let me know if you have any questions.
Bash always add the newline character, so you'll need to run
echo -n "secret" | shasum -a 512instead.
Or, run PHP:
php -r "print hash('sha512','secret');"Last edit: klockren 2017-03-13