VirtualBox

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12776 closed defect (worksforme)

Execution of root/admin processes on Linux Guest FAILED

Reported by: localhoster Owned by:
Component: guest control Version: VirtualBox 4.3.8
Keywords: sbin, root, superuser Cc:
Guest type: Linux Host type: all

Description

I can't run the root process on guest via guestcontrol.

Example:

C:\Program Files\Oracle\VirtualBox>VBoxManage guestcontrol linux execute --wait-st
dout --username=test --password=123 --verbose --image /sbin/poweroff -- -p

Opening guest session as user 'test' ...
Waiting for guest session to start ...
Guest session (ID 11) has been started
Starting guest process ...
Process '/sbin/poweroff' (PID 1848) started
Process terminated
Exit code=1 (Status=500 [successfully terminated])
Closing guest session ...

And nothing happen!
User "test" in root and adm groups!
I also tried this:

 C:\Program Files\Oracle\VirtualBox>VBoxManage guestcontrol linux execute --wait-stdout --username=test --password=123 --verbose --image /usr/bin/sudo -- poweroff -p

But result the same.
Tested with other superuser processes.

Attachments (1)

2014-03-04-20-40-14.log (97.7 KB ) - added by localhoster 10 years ago.

Download all attachments as: .zip

Change History (4)

by localhoster, 10 years ago

Attachment: 2014-03-04-20-40-14.log added

comment:1 by Frank Mehnert, 10 years ago

Resolution: worksforme
Status: newclosed

To find out why the first command line does not work, use the --wait-stderr command line parameter. When doing so, I get (Debian 7.0 guest):

Opening guest session as user 'vbox' ...
Waiting for guest session to start ...
Guest session (ID 1) has been started
Starting guest process ...
Process '/sbin/poweroff' (PID 3433) started
poweroff: must be superuser.Process terminated
Exit code=1 (Status=500 [successfully terminated])
Closing guest session ...

When using your 2nd command line I'm actually able to shut down my guest but I assume this works only because sudo in my guest does not ask for the user password. The default setting is to ask for a password -- this does not work with VBox guest control.

As a better alternative configure your guest to allow 'root' logins and use the root user (i.e. --username=root --password ....).

comment:2 by localhoster, 10 years ago

Thanks, it works!

comment:3 by Frank Mehnert, 10 years ago

Great, thanks for the feedback!

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use