9 Advanced topics 9.2 Automated guest logons VirtualBox provides Guest Addition modules for Windows, Linux and Solaris to enable automated logons on the guest. When a guest operating system is running in a virtual machine, it might be desirable to perform coordinated and automated logons using credentials from a master logon system. (With “cre- dentials”, we are referring to logon information consisting of user name, password and domain name, where each value might be empty.) 9.2.1 Automated Windows guest logons Since Windows NT, Windows has provided a modular system logon subsystem (“Winlogon”) which can be customized and extended by means of so-called GINA modules (Graphical Iden- tification and Authentication). With Windows Vista and Windows 7, the GINA modules were replaced with a new mechanism called “credential providers”. The VirtualBox Guest Additions for Windows come with both, a GINA and a credential provider module, and therefore enable any Windows guest to perform automated logons. To activate the VirtualBox GINA or credential provider module, install the Guest Additions with using the command line switch /with_autologon. All the following manual steps required for installing these modules will be then done by the installer. To manually install the VirtualBox GINA module, extract the Guest Additions (see chap- ter 4.2.1.4, Manual file extraction, page 56) and copy the file VBoxGINA.dll to the Windows SYSTEM32 directory. Then, in the registry, create the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL with a value of VBoxGINA.dll. Note: The VirtualBox GINA module is implemented as a wrapper around the standard Windows GINA module (MSGINA.DLL). As a result, it will most likely not work correctly with 3rd party GINA modules. To manually install the VirtualBox credential module, extract the Guest Additions (see chapter 4.2.1.4, Manual file extraction, page 56) and copy the file VBoxCredProv.dll to the Windows SYSTEM32 directory. Then, in the registry, create the following keys: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B} HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B} HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32 with all default values (the key named (Default) in each key) set to VBoxCredProv. After that a new string named HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel with a value of Apartment has to be created. To set credentials, use the following command on a running VM: VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST" While the VM is running, the credentials can be queried by the VirtualBox logon modules (GINA or credential provider) using the VirtualBox Guest Additions device driver. When Win- dows is in “logged out” mode, the logon modules will constantly poll for credentials and if they 136
Previous Page Next Page