Sudo-g5k

From Grid5000
Revision as of 16:34, 8 July 2020 by Pneyron (talk | contribs)
Jump to navigation Jump to search

About sudo-g5k

sudo-g5k is a command available in the Grid'5000 standard environment (the operating system running on nodes when not deploying), which allows to gain the root privileges, just like with sudo. This allows modifying the operating system, for instance installing additional Debian packages, or changing the system configuration, without requiring to first deploy (with kadeploy).

While this is a very quick way to become root on a node, note that using kadeploy provides more features, such as choosing the operating system, for instance not a Debian, or having right away a customized operating system for your experiment (with the software stack of your experimentation already deployed). See the Environments creation page for more details.

Also note that sudo-g5k does not grant the root privileges on all the nodes of a job, but only on the node the user is currently logged in.

Some explanations

sudo-g5k is a wrapper script on top of sudo, which adds some verifications with regard to the rights obtained within a job (first of all, to use sudo-g5k, the job must have reserved the whole node, not just some of the CPUs, cores or GPUs). The wrapper also notify that the system of the node is modified, so that the node must be redeployed after the job. As such, using sudo-g5k has quite a huge impact on the platform. For instance, if you end an interactive job on a node after using sudo-g5k, that node won't be available before some time, due to the redeployement process triggered by Grid'5000.

Usage

sudo-g5k can be run just once, and then the user can just use sudo afterward. Or sudo-g5k can be used anytime with the same arguments and option as sudo.