How can I install sudo without using su? [duplicate]Can sudo be reinstalled after being removed?How do I...

Broken patches on a road

Why does a metal block make a shrill sound but not a wooden block upon hammering?

Groups acting on trees

What is the purpose of easy combat scenarios that don't need resource expenditure?

If I delete my router's history can my ISP still provide it to my parents?

Am I a Rude Number?

How would one buy a used TIE Fighter or X-Wing?

If I sold a PS4 game I owned the disc for, can I reinstall it digitally?

Pre-1980's science fiction short story: alien disguised as a woman shot by a gangster, has tentacles coming out of her breasts when remaking her body

Can a dragon be stuck looking like a human?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Strange Sign on Lab Door

Does Windows 10's telemetry include sending *.doc files if Word crashed?

How would a Dictatorship make a country more successful?

Can you earn endless XP using a Flameskull and its self-revival feature?

Every character has a name - does this lead to too many named characters?

Why is working on the same position for more than 15 years not a red flag?

Why are the books in the Game of Thrones citadel library shelved spine inwards?

What is this metal M-shaped device for?

Dilemma of explaining to interviewer that he is the reason for declining second interview

Is there some relative to Dutch word "kijken" in German?

Book where aliens are selecting humans for food consumption

What to do if authors don't respond to my serious concerns about their paper?

How can animals be objects of ethics without being subjects as well?



How can I install sudo without using su? [duplicate]


Can sudo be reinstalled after being removed?How do I reset a lost administrative password?SU, SUDO and Upgrade problemStandards accounts are able to get root access using sudo without password requestSudo hangs without prompting for passwordNo root privileges when using GUIWhat is the command to switch to normal user?Authentication failureRedirection operator priority in BashInstall mobile partner using super userHow to be root on liveUSB?Trusty - Sudo password?













3
















This question already has an answer here:




  • Can sudo be reinstalled after being removed?

    7 answers




I need to use sudo but when I try to use it, a prompt tells me the command is not found and I need to install sudo.

So when I switch to su so I can gain root access to install sudo, it says auth failure



sudo and su problem description



How can I fix this?










share|improve this question









New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by Kulfy, Pilot6, karel, Zanna, dessert 9 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 3





    You might need to enter the recovery mode at the Grub menu, select the 'root shell', and try installing sudo. Not sure will work though. Obviously, sudo is preinstalled by default, and removing it was a bad idea.

    – mikewhatever
    17 hours ago











  • See also: unix.stackexchange.com/q/333061/140314

    – OldBunny2800
    12 hours ago
















3
















This question already has an answer here:




  • Can sudo be reinstalled after being removed?

    7 answers




I need to use sudo but when I try to use it, a prompt tells me the command is not found and I need to install sudo.

So when I switch to su so I can gain root access to install sudo, it says auth failure



sudo and su problem description



How can I fix this?










share|improve this question









New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by Kulfy, Pilot6, karel, Zanna, dessert 9 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 3





    You might need to enter the recovery mode at the Grub menu, select the 'root shell', and try installing sudo. Not sure will work though. Obviously, sudo is preinstalled by default, and removing it was a bad idea.

    – mikewhatever
    17 hours ago











  • See also: unix.stackexchange.com/q/333061/140314

    – OldBunny2800
    12 hours ago














3












3








3









This question already has an answer here:




  • Can sudo be reinstalled after being removed?

    7 answers




I need to use sudo but when I try to use it, a prompt tells me the command is not found and I need to install sudo.

So when I switch to su so I can gain root access to install sudo, it says auth failure



sudo and su problem description



How can I fix this?










share|improve this question









New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













This question already has an answer here:




  • Can sudo be reinstalled after being removed?

    7 answers




I need to use sudo but when I try to use it, a prompt tells me the command is not found and I need to install sudo.

So when I switch to su so I can gain root access to install sudo, it says auth failure



sudo and su problem description



How can I fix this?





This question already has an answer here:




  • Can sudo be reinstalled after being removed?

    7 answers








18.04 sudo su administrator






share|improve this question









New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 17 hours ago









Kulfy

4,81651743




4,81651743






New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 17 hours ago









Gijs ClaesGijs Claes

161




161




New contributor




Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Gijs Claes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




marked as duplicate by Kulfy, Pilot6, karel, Zanna, dessert 9 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Kulfy, Pilot6, karel, Zanna, dessert 9 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 3





    You might need to enter the recovery mode at the Grub menu, select the 'root shell', and try installing sudo. Not sure will work though. Obviously, sudo is preinstalled by default, and removing it was a bad idea.

    – mikewhatever
    17 hours ago











  • See also: unix.stackexchange.com/q/333061/140314

    – OldBunny2800
    12 hours ago














  • 3





    You might need to enter the recovery mode at the Grub menu, select the 'root shell', and try installing sudo. Not sure will work though. Obviously, sudo is preinstalled by default, and removing it was a bad idea.

    – mikewhatever
    17 hours ago











  • See also: unix.stackexchange.com/q/333061/140314

    – OldBunny2800
    12 hours ago








3




3





You might need to enter the recovery mode at the Grub menu, select the 'root shell', and try installing sudo. Not sure will work though. Obviously, sudo is preinstalled by default, and removing it was a bad idea.

– mikewhatever
17 hours ago





You might need to enter the recovery mode at the Grub menu, select the 'root shell', and try installing sudo. Not sure will work though. Obviously, sudo is preinstalled by default, and removing it was a bad idea.

– mikewhatever
17 hours ago













See also: unix.stackexchange.com/q/333061/140314

– OldBunny2800
12 hours ago





See also: unix.stackexchange.com/q/333061/140314

– OldBunny2800
12 hours ago










1 Answer
1






active

oldest

votes


















11














Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:



Grub Menu



If instead you get options like:
Initial Grub Menu



You need to go to Advanced Options using arrow keys and hit Enter and then choose the recovery mode



Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.



Now you should see this menu:
Recovery mode



Using the arrow keys scroll down to network and hit Enter to enable networking. If asked to remount the partition, hit Enter on yes.



And then go to root in the same menu and then hit Enter.



You should now see a root prompt, something like this:



root@gijs-pc:~#


At this stage you might have a read-only filesystem. You have to remount it with write permissions:



mount -o remount,rw /


now, install sudo by:



apt install sudo


check your sudo settings once again by:



visudo


also, check if your account gijs is a member of sudo
If not, add him as a member of sudo and wheel group by:



usermod -aG sudo gijs
usermod -aG wheel gijs


Now, you may restart and you now should have access to sudo.



This answer is abridged version of Jorge Castro's answer on How do I reset a lost administrative password?






share|improve this answer





















  • 2





    Maybe you should enable network before dropping to root shell !!

    – Soren A
    17 hours ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    17 hours ago






  • 1





    Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

    – Varun Chhangani
    16 hours ago


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









11














Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:



Grub Menu



If instead you get options like:
Initial Grub Menu



You need to go to Advanced Options using arrow keys and hit Enter and then choose the recovery mode



Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.



Now you should see this menu:
Recovery mode



Using the arrow keys scroll down to network and hit Enter to enable networking. If asked to remount the partition, hit Enter on yes.



And then go to root in the same menu and then hit Enter.



You should now see a root prompt, something like this:



root@gijs-pc:~#


At this stage you might have a read-only filesystem. You have to remount it with write permissions:



mount -o remount,rw /


now, install sudo by:



apt install sudo


check your sudo settings once again by:



visudo


also, check if your account gijs is a member of sudo
If not, add him as a member of sudo and wheel group by:



usermod -aG sudo gijs
usermod -aG wheel gijs


Now, you may restart and you now should have access to sudo.



This answer is abridged version of Jorge Castro's answer on How do I reset a lost administrative password?






share|improve this answer





















  • 2





    Maybe you should enable network before dropping to root shell !!

    – Soren A
    17 hours ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    17 hours ago






  • 1





    Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

    – Varun Chhangani
    16 hours ago
















11














Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:



Grub Menu



If instead you get options like:
Initial Grub Menu



You need to go to Advanced Options using arrow keys and hit Enter and then choose the recovery mode



Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.



Now you should see this menu:
Recovery mode



Using the arrow keys scroll down to network and hit Enter to enable networking. If asked to remount the partition, hit Enter on yes.



And then go to root in the same menu and then hit Enter.



You should now see a root prompt, something like this:



root@gijs-pc:~#


At this stage you might have a read-only filesystem. You have to remount it with write permissions:



mount -o remount,rw /


now, install sudo by:



apt install sudo


check your sudo settings once again by:



visudo


also, check if your account gijs is a member of sudo
If not, add him as a member of sudo and wheel group by:



usermod -aG sudo gijs
usermod -aG wheel gijs


Now, you may restart and you now should have access to sudo.



This answer is abridged version of Jorge Castro's answer on How do I reset a lost administrative password?






share|improve this answer





















  • 2





    Maybe you should enable network before dropping to root shell !!

    – Soren A
    17 hours ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    17 hours ago






  • 1





    Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

    – Varun Chhangani
    16 hours ago














11












11








11







Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:



Grub Menu



If instead you get options like:
Initial Grub Menu



You need to go to Advanced Options using arrow keys and hit Enter and then choose the recovery mode



Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.



Now you should see this menu:
Recovery mode



Using the arrow keys scroll down to network and hit Enter to enable networking. If asked to remount the partition, hit Enter on yes.



And then go to root in the same menu and then hit Enter.



You should now see a root prompt, something like this:



root@gijs-pc:~#


At this stage you might have a read-only filesystem. You have to remount it with write permissions:



mount -o remount,rw /


now, install sudo by:



apt install sudo


check your sudo settings once again by:



visudo


also, check if your account gijs is a member of sudo
If not, add him as a member of sudo and wheel group by:



usermod -aG sudo gijs
usermod -aG wheel gijs


Now, you may restart and you now should have access to sudo.



This answer is abridged version of Jorge Castro's answer on How do I reset a lost administrative password?






share|improve this answer















Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:



Grub Menu



If instead you get options like:
Initial Grub Menu



You need to go to Advanced Options using arrow keys and hit Enter and then choose the recovery mode



Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.



Now you should see this menu:
Recovery mode



Using the arrow keys scroll down to network and hit Enter to enable networking. If asked to remount the partition, hit Enter on yes.



And then go to root in the same menu and then hit Enter.



You should now see a root prompt, something like this:



root@gijs-pc:~#


At this stage you might have a read-only filesystem. You have to remount it with write permissions:



mount -o remount,rw /


now, install sudo by:



apt install sudo


check your sudo settings once again by:



visudo


also, check if your account gijs is a member of sudo
If not, add him as a member of sudo and wheel group by:



usermod -aG sudo gijs
usermod -aG wheel gijs


Now, you may restart and you now should have access to sudo.



This answer is abridged version of Jorge Castro's answer on How do I reset a lost administrative password?







share|improve this answer














share|improve this answer



share|improve this answer








edited 11 hours ago

























answered 17 hours ago









Varun ChhanganiVarun Chhangani

12819




12819








  • 2





    Maybe you should enable network before dropping to root shell !!

    – Soren A
    17 hours ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    17 hours ago






  • 1





    Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

    – Varun Chhangani
    16 hours ago














  • 2





    Maybe you should enable network before dropping to root shell !!

    – Soren A
    17 hours ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    17 hours ago






  • 1





    Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

    – Varun Chhangani
    16 hours ago








2




2





Maybe you should enable network before dropping to root shell !!

– Soren A
17 hours ago







Maybe you should enable network before dropping to root shell !!

– Soren A
17 hours ago















@SorenA sorry and thanks. Changed it

– Varun Chhangani
17 hours ago





@SorenA sorry and thanks. Changed it

– Varun Chhangani
17 hours ago




1




1





Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

– Varun Chhangani
16 hours ago





Hmm.. Indeed as @Olorin said, It is a duplicate. Surely, we can use pkexec too

– Varun Chhangani
16 hours ago



Popular posts from this blog

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...