I want to get access to the root permission
I tried this command named as sudo su in the terminal
it asked for my password
i submitted correct password
after submitting the password I get this error
Almost sounds, to me, like you provided the root password on that request. I don’t know why this is so, but it was very confusing for me too, until only recently. This is how I understand it:
When you wish to run a command as as your own user but with root priviledges, you run it with sudo. For example:
sudo ls /
(Yeah, I know it’s basic, but that’s not the point.)
When you run that command as your user, not root, it’ll still execute as YOU, and not as root, but it will give you the same results as if you ran:
ls /
as the root user.
Hence, yo use sudo you need to use your own user’s password, notroot’s. So,
sudo su
requires you to use your own password.
However, that’s unnecessary. (Yeah, I also only learnt this recently.) I you require a root shell, it’s only necessary to run su:
su
For that you have to enter root’s password, not your user’s. You are then root, and all commands are executed as root with root priviledges and permisssions.
Just as an aside, never use su just like that unless you really know what you’re doing.
Always use…
su -
… or…
su -l root
… or…
su - root
Rationale: If you use su without the dash, then you will be running a root shell but with the environment of the invoking user. This means that you may accidentally overwrite files in your home directory and cause them to become root-owned.