VirtualBox

Changeset 99519 in vbox


Ignore:
Timestamp:
Apr 24, 2023 9:49:12 AM (22 months ago)
Author:
vboxsync
Message:

Validation Kit/Guest Control: Some older Linux test VMs (like tst-rhel5) don't have a pre-configured 'vbox' user. So make sure that this user exists and has the appropriate password set. Ignore any errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r99399 r99519  
    17041704            reporter.log('Too old TxS service running')
    17051705            fEnableVerboseLogging = False;
     1706
     1707        # Some older Linux test VMs (like tst-rhel5) don't have a pre-configured 'vbox' user.
     1708        # So make sure that this user exists and has the appropriate password set. Ignore any errors.
     1709        if oTestVm.isLinux():
     1710            sCmdUserAdd = oTestVm.pathJoin(self.oTstDrv.getGuestSystemAdminDir(oTestVm, sPathPrefix = '/usr'), 'useradd');
     1711            asArgs = [ sCmdUserAdd, '-m', 'vbox' ];
     1712            self.oTstDrv.txsRunTest(oTxsSession, sCmdUserAdd, 5 * 60 * 1000, sCmdUserAdd, asArgs,
     1713                                    fCheckSessionStatus = False);
     1714            # We must supply the password in an encrypted form using chpasswd (via stdin).
     1715            sCmdChPasswd = oTestVm.pathJoin(self.oTstDrv.getGuestSystemAdminDir(oTestVm, sPathPrefix = '/usr'), 'chpasswd');
     1716            asArgs = [ sCmdChPasswd ];
     1717            self.oTstDrv.txsRunTestStdIn(oTxsSession, sCmdChPasswd, 5 * 60 * 1000, sCmdChPasswd, asArgs,
     1718                                         sStdIn = 'vbox:password\n', fIgnoreErrors = True);
    17061719
    17071720        #
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