1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="vbox-auth">
|
---|
4 | <title>RDP Authentication</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>For each virtual machine that is remotely accessible using RDP, you can individually determine if and how client connections are authenticated. For this, use the <userinput>VBoxManage modifyvm</userinput> command with the <codeph>--vrde-auth-type</codeph> option. See <xref href="../cli_topics/vboxmanage-modifyvm.dita"/>. The following methods of authentication are available: </p>
|
---|
8 | <ul>
|
---|
9 | <li>
|
---|
10 | <p>The <b outputclass="bold">null</b> method means that there is no authentication at all. Any client can
|
---|
11 | connect to the VRDP server and thus the virtual machine. This is very insecure and only to be recommended for
|
---|
12 | private networks. </p>
|
---|
13 | </li>
|
---|
14 | <li>
|
---|
15 | <p>The <b outputclass="bold">external</b> method provides external authentication through a special
|
---|
16 | authentication library. <ph conkeyref="vbox-conkeyref-phrases/product-name"/> ships with two special
|
---|
17 | authentication libraries: </p>
|
---|
18 | <ol>
|
---|
19 | <li>
|
---|
20 | <p>The default authentication library, <userinput>VBoxAuth</userinput>, authenticates against user
|
---|
21 | credentials of the hosts. Depending on the host platform, this means the following: </p>
|
---|
22 | <ul>
|
---|
23 | <li>
|
---|
24 | <p>On Linux and Oracle Solaris hosts, <userinput>VBoxAuth.so</userinput> authenticates users against the host's PAM system. </p>
|
---|
25 | </li>
|
---|
26 | <li>
|
---|
27 | <p>On Windows hosts, <userinput>VBoxAuth.dll</userinput> authenticates users against the host's WinLogon
|
---|
28 | system. </p>
|
---|
29 | </li>
|
---|
30 | <li>
|
---|
31 | <p>On macOS hosts, <userinput>VBoxAuth.dylib</userinput> authenticates users against the host's
|
---|
32 | directory service. </p>
|
---|
33 | </li>
|
---|
34 | </ul>
|
---|
35 | <p>In other words, the external method by default performs authentication with the user accounts that exist
|
---|
36 | on the host system. Any user with valid authentication credentials is accepted. For example, the username
|
---|
37 | does not have to correspond to the user running the VM. </p>
|
---|
38 | </li>
|
---|
39 | <li>
|
---|
40 | <p>An additional library called <userinput>VBoxAuthSimple</userinput> performs authentication against
|
---|
41 | credentials configured in the <codeph>extradata</codeph> section of a virtual machine's XML settings file.
|
---|
42 | This is probably the simplest way to get authentication that does not depend on a running and supported
|
---|
43 | guest. The following steps are required: </p>
|
---|
44 | <ol>
|
---|
45 | <li>
|
---|
46 | <p>Enable <userinput>VBoxAuthSimple</userinput> with the following command: </p>
|
---|
47 | <pre xml:space="preserve">VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"</pre>
|
---|
48 | </li>
|
---|
49 | <li>
|
---|
50 | <p>To enable the library for a particular VM, you must switch authentication to external, as follows: </p>
|
---|
51 | <pre xml:space="preserve">VBoxManage modifyvm <varname>VM-name</varname> --vrde-auth-type external</pre>
|
---|
52 | <p>Replace <varname>VM-name</varname> with the VM name or UUID. </p>
|
---|
53 | </li>
|
---|
54 | <li>
|
---|
55 | <p>You then need to configure users and passwords by writing items into the machine's extradata. Since
|
---|
56 | the XML machine settings file, into whose <codeph>extradata</codeph> section the password needs to be
|
---|
57 | written, is a plain text file, <ph conkeyref="vbox-conkeyref-phrases/product-name"/> uses hashes to
|
---|
58 | encrypt passwords. The following command must be used: </p>
|
---|
59 | <pre xml:space="preserve">VBoxManage setextradata <varname>VM-name</varname> "VBoxAuthSimple/users/<varname>user</varname>" <varname>hash</varname>
|
---|
60 | </pre>
|
---|
61 | <p>Replace <varname>VM-name</varname> with the VM name or UUID, <varname>user</varname> with the user
|
---|
62 | name who should be allowed to log in and <varname>hash</varname> with the encrypted password. The
|
---|
63 | following command example obtains the hash value for the password <codeph>secret</codeph>: </p>
|
---|
64 | <pre xml:space="preserve">$ VBoxManage internalcommands passwordhash "secret"
|
---|
65 | 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b</pre>
|
---|
66 | <p>You then use <userinput>VBoxManage setextradata</userinput> to store this value in the machine's
|
---|
67 | <codeph>extradata</codeph> section. </p>
|
---|
68 | <p>As a combined example, to set the password for the user <codeph>john</codeph> and the machine
|
---|
69 | <codeph>My VM</codeph> to <codeph>secret</codeph>, use this command: </p>
|
---|
70 | <pre xml:space="preserve">VBoxManage setextradata "My VM" "VBoxAuthSimple/users/john"
|
---|
71 | 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b</pre>
|
---|
72 | </li>
|
---|
73 | </ol>
|
---|
74 | </li>
|
---|
75 | </ol>
|
---|
76 | </li>
|
---|
77 | <li>
|
---|
78 | <p>The <b outputclass="bold">guest</b> authentication method performs authentication with a special component
|
---|
79 | that comes with the Guest Additions. As a result, authentication is not performed on the host, but with the
|
---|
80 | guest user accounts. </p>
|
---|
81 | <p>This method is currently still in testing and not yet supported. </p>
|
---|
82 | </li>
|
---|
83 | </ul>
|
---|
84 | <p>In addition to the methods described above, you can replace the default external authentication module with any
|
---|
85 | other module. For this, <ph conkeyref="vbox-conkeyref-phrases/product-name"/> provides a well-defined interface
|
---|
86 | that enables you to write your own authentication module. This is described in detail in the <ph
|
---|
87 | conkeyref="vbox-conkeyref-phrases/product-name"/> Software Development Kit (SDK) reference. See <xref
|
---|
88 | href="VirtualBoxAPI.dita#VirtualBoxAPI"/>. </p>
|
---|
89 | </body>
|
---|
90 |
|
---|
91 | </topic>
|
---|