This is one of those things I probably ought to know, but I’ve never needed it before now. I want to start VirtualBox with an init script in /etc/init.d. That part’s easy (I’ve already got it). But I don’t want it to run as root, I want it to run as a less-privileged user. How do I do that? Put an “su” in the script? suid the executable?
Thanks, Ken, and sheesh. I had forgotten about startproc, even though I’ve used it in the past with scripts.
I have become a VirtualBox lover and mega-user. We’re running our mail server in it on one machine, and on the one in question here, I’m going to run both an FTP server and a firewall on separate IP addresses. All three “machines” – the host and the two guests – will be minimal, text-only installs. Just as a matter of principle, I don’t like running a VM as root. I feel like I get another layer of security that way.
The PC in question has several NICs, so it’s ideal. I can set up two to bridge straight into and out of the firewall and a third bridges straight into the FTP server. Best of all, I’m using OpenSUSE 11.1, with which I’m totally comfortable, but when it comes time to upgrade, I’ll just down the VM for about an hour and install the new version. It’s slicker’n hot oil on a doorknob.
Best of best of all, I can do the upgrades remotely. (I just did a net install of 11.1 in one of the VMs last night; worked like a hose.)