I've set up VMWare Player for my wife. Every once in a while (notably after a kernel update), the VMWare Player needs to be compiled into the kernel.
My spouse does not have su- activated (if anybody screws up the OS, it's going to be me). I'd like to give her permission to do this, but only for that program.
Is this possible? Can it be done safely (for the OS)? How can it be done?
Edit: I tried to add the following to visudo
guijunkette ALL=(ALL) NOPASSWD: /usr/bin/vmware-modconfig
When running with her user, after typing her password, the following error occurred:
So, in the end, no cigar.
Edit: I've given up on VMWare Player and moved to VirtualBox. Made a clean install.
We'll assume your spouse's username is guijunkette. The script to manage the VMWare kernel modules is
/usr/bin/vmware-modconfig
; in light of the note above, it's best to explicitly invoke this from the terminal; to make life easier for your wife, I have included a desktop shortcut so that she needn't even open the terminal.sudo visudo
Around line 25, below the line
%sudo ALL=(ALL:ALL) ALL
, insert:Exit the editor
To rebuild the modules, she can now run
sudo vmware-modconfig --console --install-all
without being asked for a password.Desktop Shortcut
What you can do is create the following desktop file in your wife's
~/Desktop
folder, and whenever VMWare Player flashes the "You must..." message, ask her to click Cancel, run this shortcut, and then start VMware Player (successfully) again:Paste this into, e.g.
/home/guijunkette/Desktop/vmwareupdater.desktop
, and remember tochmod +x
it.Here's a demo: