[Openstack-docs] [training-guides] sudo vs. root

Anne Gentle anne at openstack.org
Fri Jun 13 14:51:11 UTC 2014


On Fri, Jun 13, 2014 at 3:54 AM, Roger Luethi <rl at patchworkscience.org>
wrote:

> For the training-guides scripts, this is a decision of some importance:
> do we write scripts that run as root (within the VMs, of course),
> or do we use sudo where necessary?
>
> The install guide uses different prompts ($, #) to indicate regular vs.
> root user [1]:
>
> ---------------------------------------------------------
> Commands prefixed with the # prompt are to be executed by the root user.
> These examples can also be executed by using the sudo command, if
> available.
>
> Commands prefixed with the $ prompt can be executed by any user, including
> root.
> ---------------------------------------------------------
>
> Obviously, our scripts cannot just change a prompt to switch users.
> Switching users adds some complexity (for instance, you lose much of
> your environment in a sudo call and need to rebuild it every time).
> The devstack scripts (although not intended for production) go to great
> lengths to run as a regular user and use sudo when necessary.
>
>
I'll let a real trainer weigh in, but this approach seems sound to
replicate.


> The training-guides infrastructure is also set up to use sudo rather than
> being root. This is going to be much harder to change once all the the
> scripts have been written, so if this is considered a bad decision, please
> let us know.
>
> Roger
>
> [1]
> http://docs.openstack.org/icehouse/install-guide/install/apt-debian/content/ch_preface.html
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20140613/517db6c6/attachment.html>


More information about the Openstack-docs mailing list