Corrupt sudoers files ubuntu 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I installed ubuntu 18.04 on an AWS instance, and accessed it via a putty session as ubuntu (using the AWS generated key).



I wanted to allow password based login, and I modified the ssh_login and sshd_login to allow password based authentication.



Then I screwed up, and manually edited the /etc/sudoers files



sudo vi sudoers


and saved the file. I made a syntax error in sudoers. I am now stuck.



Yes, I should have used pkexec visudo, but I did not. Any idea how to fix this? This is a remote system, so I cannot reboot in debug mode, or use a USB to reboot.







share|improve this question




















  • These instructions might enable you to mount and edit /etc/sudoers in another instance. I'm a bit rushed, so I didn't verify that it can do that.
    – Chai T. Rex
    May 24 at 23:06










  • Yes, this will work, but this is the only disk, and I freeze the instance, I will not be able to "re-attach" it, nothing to attach it to
    – EastsideDeveloper
    May 24 at 23:08










  • "I should have used pkexec visudo" ... and you still can.
    – muru
    May 25 at 1:56














up vote
0
down vote

favorite












I installed ubuntu 18.04 on an AWS instance, and accessed it via a putty session as ubuntu (using the AWS generated key).



I wanted to allow password based login, and I modified the ssh_login and sshd_login to allow password based authentication.



Then I screwed up, and manually edited the /etc/sudoers files



sudo vi sudoers


and saved the file. I made a syntax error in sudoers. I am now stuck.



Yes, I should have used pkexec visudo, but I did not. Any idea how to fix this? This is a remote system, so I cannot reboot in debug mode, or use a USB to reboot.







share|improve this question




















  • These instructions might enable you to mount and edit /etc/sudoers in another instance. I'm a bit rushed, so I didn't verify that it can do that.
    – Chai T. Rex
    May 24 at 23:06










  • Yes, this will work, but this is the only disk, and I freeze the instance, I will not be able to "re-attach" it, nothing to attach it to
    – EastsideDeveloper
    May 24 at 23:08










  • "I should have used pkexec visudo" ... and you still can.
    – muru
    May 25 at 1:56












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I installed ubuntu 18.04 on an AWS instance, and accessed it via a putty session as ubuntu (using the AWS generated key).



I wanted to allow password based login, and I modified the ssh_login and sshd_login to allow password based authentication.



Then I screwed up, and manually edited the /etc/sudoers files



sudo vi sudoers


and saved the file. I made a syntax error in sudoers. I am now stuck.



Yes, I should have used pkexec visudo, but I did not. Any idea how to fix this? This is a remote system, so I cannot reboot in debug mode, or use a USB to reboot.







share|improve this question












I installed ubuntu 18.04 on an AWS instance, and accessed it via a putty session as ubuntu (using the AWS generated key).



I wanted to allow password based login, and I modified the ssh_login and sshd_login to allow password based authentication.



Then I screwed up, and manually edited the /etc/sudoers files



sudo vi sudoers


and saved the file. I made a syntax error in sudoers. I am now stuck.



Yes, I should have used pkexec visudo, but I did not. Any idea how to fix this? This is a remote system, so I cannot reboot in debug mode, or use a USB to reboot.









share|improve this question











share|improve this question




share|improve this question










asked May 24 at 23:01









EastsideDeveloper

1279




1279











  • These instructions might enable you to mount and edit /etc/sudoers in another instance. I'm a bit rushed, so I didn't verify that it can do that.
    – Chai T. Rex
    May 24 at 23:06










  • Yes, this will work, but this is the only disk, and I freeze the instance, I will not be able to "re-attach" it, nothing to attach it to
    – EastsideDeveloper
    May 24 at 23:08










  • "I should have used pkexec visudo" ... and you still can.
    – muru
    May 25 at 1:56
















  • These instructions might enable you to mount and edit /etc/sudoers in another instance. I'm a bit rushed, so I didn't verify that it can do that.
    – Chai T. Rex
    May 24 at 23:06










  • Yes, this will work, but this is the only disk, and I freeze the instance, I will not be able to "re-attach" it, nothing to attach it to
    – EastsideDeveloper
    May 24 at 23:08










  • "I should have used pkexec visudo" ... and you still can.
    – muru
    May 25 at 1:56















These instructions might enable you to mount and edit /etc/sudoers in another instance. I'm a bit rushed, so I didn't verify that it can do that.
– Chai T. Rex
May 24 at 23:06




These instructions might enable you to mount and edit /etc/sudoers in another instance. I'm a bit rushed, so I didn't verify that it can do that.
– Chai T. Rex
May 24 at 23:06












Yes, this will work, but this is the only disk, and I freeze the instance, I will not be able to "re-attach" it, nothing to attach it to
– EastsideDeveloper
May 24 at 23:08




Yes, this will work, but this is the only disk, and I freeze the instance, I will not be able to "re-attach" it, nothing to attach it to
– EastsideDeveloper
May 24 at 23:08












"I should have used pkexec visudo" ... and you still can.
– muru
May 25 at 1:56




"I should have used pkexec visudo" ... and you still can.
– muru
May 25 at 1:56















active

oldest

votes











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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040014%2fcorrupt-sudoers-files-ubuntu-18-04%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040014%2fcorrupt-sudoers-files-ubuntu-18-04%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error