How can I install sudo without using su?How do I reset a lost administrative password?Can sudo be reinstalled...

Is there any other number that has similar properties as 21?

Program that converts a number to a letter of the alphabet

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

Eww, those bytes are gross

Parsing a string of key-value pairs as a dictionary

Early credit roll before the end of the film

Roman Numerals equation 1

How should I handle players who ignore the session zero agreement?

Intern applicant asking for compensation equivalent to that of permanent employee

Blindfold battle as a gladiatorial spectacle - what are the tactics and communication methods?

What is this metal M-shaped device for?

How can my powered armor quickly replace its ceramic plates?

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

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

Differentiate between Local and Global Unitaries

Can a person refuse a presidential pardon?

Are there any modern advantages of a fire piston?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Difference between `vector<int> v;` and `vector<int> v = vector<int>();`

Highly technological aliens land nuclear fusion powered ships in medieval city and slaughter everyone, using swords?

Cookies - Should the toggles be on?

How to escape the null character in here-document?(bash and/or dash)

Am I a Rude Number?

Using only 1s, make 29 with the minimum number of digits



How can I install sudo without using su?


How do I reset a lost administrative password?Can sudo be reinstalled after being removed?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?













1















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.
















  • 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
    1 hour ago






  • 3





    Possible duplicate of Can sudo be reinstalled after being removed?

    – Olorin
    46 mins ago
















1















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.
















  • 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
    1 hour ago






  • 3





    Possible duplicate of Can sudo be reinstalled after being removed?

    – Olorin
    46 mins ago














1












1








1








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.












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?







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 1 hour ago









Kulfy

4,79651743




4,79651743






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 1 hour ago









Gijs ClaesGijs Claes

61




61




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.








  • 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
    1 hour ago






  • 3





    Possible duplicate of Can sudo be reinstalled after being removed?

    – Olorin
    46 mins 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
    1 hour ago






  • 3





    Possible duplicate of Can sudo be reinstalled after being removed?

    – Olorin
    46 mins 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
1 hour 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
1 hour ago




3




3





Possible duplicate of Can sudo be reinstalled after being removed?

– Olorin
46 mins ago





Possible duplicate of Can sudo be reinstalled after being removed?

– Olorin
46 mins ago










1 Answer
1






active

oldest

votes


















5














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 group by:



usermod -aG sudo 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
    1 hour ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    1 hour ago











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

    – Varun Chhangani
    38 mins ago






  • 2





    Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

    – Kulfy
    29 mins ago






  • 2





    @EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

    – Kulfy
    29 mins ago













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Gijs Claes is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1122197%2fhow-can-i-install-sudo-without-using-su%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














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 group by:



usermod -aG sudo 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
    1 hour ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    1 hour ago











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

    – Varun Chhangani
    38 mins ago






  • 2





    Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

    – Kulfy
    29 mins ago






  • 2





    @EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

    – Kulfy
    29 mins ago


















5














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 group by:



usermod -aG sudo 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
    1 hour ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    1 hour ago











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

    – Varun Chhangani
    38 mins ago






  • 2





    Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

    – Kulfy
    29 mins ago






  • 2





    @EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

    – Kulfy
    29 mins ago
















5












5








5







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 group by:



usermod -aG sudo 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 group by:



usermod -aG sudo 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 58 mins ago

























answered 1 hour ago









Varun ChhanganiVarun Chhangani

6818




6818








  • 2





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

    – Soren A
    1 hour ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    1 hour ago











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

    – Varun Chhangani
    38 mins ago






  • 2





    Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

    – Kulfy
    29 mins ago






  • 2





    @EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

    – Kulfy
    29 mins ago
















  • 2





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

    – Soren A
    1 hour ago













  • @SorenA sorry and thanks. Changed it

    – Varun Chhangani
    1 hour ago











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

    – Varun Chhangani
    38 mins ago






  • 2





    Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

    – Kulfy
    29 mins ago






  • 2





    @EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

    – Kulfy
    29 mins ago










2




2





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

– Soren A
1 hour ago







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

– Soren A
1 hour ago















@SorenA sorry and thanks. Changed it

– Varun Chhangani
1 hour ago





@SorenA sorry and thanks. Changed it

– Varun Chhangani
1 hour ago













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

– Varun Chhangani
38 mins ago





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

– Varun Chhangani
38 mins ago




2




2





Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

– Kulfy
29 mins ago





Hey @EODCraftStaff, while I respect your opinion but IMHO it is very unwise to not to upvote an answer just because it is a well explained version of what other user has commented. Comments could be deleted for many reasons and mikewhatever (I think) has assumed that OP knows how to get into Grub menu and then recovery mode and ... Also it is very unwise to not to upvote an answer just because the question is duplicate. I've seen many a times answers on duplicate get more votes than the answers on original one. Neither the question is too bad nor the answer.

– Kulfy
29 mins ago




2




2





@EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

– Kulfy
29 mins ago







@EODCraftStaff At the end, vote is yours, you have your own opinions and views to cast it or not. I just shared my opinions as well :)

– Kulfy
29 mins ago












Gijs Claes is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Gijs Claes is a new contributor. Be nice, and check out our Code of Conduct.













Gijs Claes is a new contributor. Be nice, and check out our Code of Conduct.












Gijs Claes is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1122197%2fhow-can-i-install-sudo-without-using-su%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

“%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

夢乃愛華...