How to get / gain root shell without root passwordFollow @ggarron
Since the appearance of Ubuntu, sudo became more famous than ever, I do not use Ubuntu but certainly use
sudo since my first meet with Ubuntu.
But, if you need to issue more than just one simple command in the shell, you’d better switch to root work there and then go back to your account.
This can be done with
And then entering the root password, but what if you are using Ubuntu, where you can not switch to root account, or what your users can do if you do not want to give all of them the root password, and only give the permissions in the sudoers file.
How to get root shell without the root password
If you are in the sudoers file, and your account have enough permissions, you will be able to get a root shell with:
This will give you the shell you have in the SHELL environment variable, or if not set, the shell configured in the