Is it possible to have multiple users using a root shell but with different prompts on the BASH shell for each session/user? We have some training environments with our users using su/sudo to get to a root shell for demonstration purposes.
Note: I'm aware of best practice regarding su/sudo etc. These are training environments and I specifically want then to run an interactive shell as root for learning purposes.
sudo
to prefix administrational commands without ever getting an interactive root prompt, in their own personal VM set up for the training session. For training purposes, that would definitely be best. For hacked up systems were things can be expected to work very differently from anywhere else, the root prompt can probably be made to contain the value of theSUDO_USER
variable. I leave it up to other users here to write that up as an answer.sudo -s
,sudo -i
orsu -
to get a shell as root. I do specifically want them to run the interactive shell as root. I want this to demonstrate various aspects as to why we don't generally do this in production.