VirtualBox

Changeset 68187 in vbox


Ignore:
Timestamp:
Jul 31, 2017 8:55:16 AM (7 years ago)
Author:
vboxsync
Message:

VBoxManage/unatteded: Added --password-file option to install.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/man_VBoxManage-unattended.xml

    r68144 r68187  
    4444      <arg>--user=<replaceable>login</replaceable></arg>
    4545      <arg>--password=<replaceable>password</replaceable></arg>
     46      <arg>--password-file=<replaceable>file</replaceable></arg>
    4647      <arg>--full-user-name=<replaceable>name</replaceable></arg>
    4748      <arg>--key=<replaceable>product-key</replaceable></arg>
     
    112113        <varlistentry>
    113114          <term><option>--password=<replaceable>password</replaceable></option></term>
    114           <listitem><para>The login password. (default: changeme)</para></listitem>
     115          <listitem>
     116            <para>The login password.  This is used for the user given by <option>--user</option> as well as the
     117              root/administrator user.  (default: changeme)</para></listitem>
     118        </varlistentry>
     119        <varlistentry>
     120          <term><option>--password-file=<replaceable>file</replaceable></option></term>
     121          <listitem>
     122            <para>Alternative to <option>--password</option> for providing the password.  Special filename
     123              <computeroutput>stdin</computeroutput> can be used to read the password from standard input.</para></listitem>
    115124        </varlistentry>
    116125        <varlistentry>
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp

    r68153 r68187  
    13871387        { "--iso",                              'i', RTGETOPT_REQ_STRING },
    13881388        { "--user",                             'u', RTGETOPT_REQ_STRING },
    1389         { "--password",                         'p', RTGETOPT_REQ_STRING }, /** @todo password file ++ */
     1389        { "--password",                         'p', RTGETOPT_REQ_STRING },
     1390        { "--password-file",                    'X', RTGETOPT_REQ_STRING },
    13901391        { "--full-user-name",                   'U', RTGETOPT_REQ_STRING },
    13911392        { "--key",                              'k', RTGETOPT_REQ_STRING },
     
    14461447                break;
    14471448
     1449            case 'X':   // --password-file
     1450            {
     1451                Utf8Str strPassword;
     1452                RTEXITCODE rcExit = readPasswordFile(ValueUnion.psz, &strPassword);
     1453                if (rcExit != RTEXITCODE_SUCCESS)
     1454                    return rcExit;
     1455                CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(Password)(Bstr(strPassword).raw()), RTEXITCODE_FAILURE);
     1456                break;
     1457            }
     1458
    14481459            case 'U':   // --full-user-name
    14491460                CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(FullUserName)(Bstr(ValueUnion.psz).raw()), RTEXITCODE_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette