How to switch user to root user in Linux after new Linux VM creation

Chakraborthy, Avijit 0 Reputation points
2024-09-05T19:47:44.2+00:00

Dear Community,

I just provisioned a new Linux VM but I am unable to switch to root user using sudo. I ma getting the below error.

avijit [ ~ ]$ sudo su -

sudo: The "no new privileges" flag is set, which prevents sudo from running as root.

sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

How do I access root user ? Please help !

Thanks and regards,

Avijit

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,791 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.