Fix to low permission /etc Raspberry Pi
So I have made a huge misstake on my Raspberry Pi 3. Trying to edit the access level of some file deep into the /etc dir, I ran the command sudo chmod 444 /etc
without thinking, which now has locked me out of the /etc directory completely. I cannot use sudo because the sudoers file is in /etc, and my use of any command is very limited.
I wonder, is this fixable? From what I have found on the web, the root user of a Raspberry Pi does not have a default password, and as I have not created one I cannot access it either, right? I found somewhere that I should enter recovery mode and change permission from there, but when booting with HDMI cable, the screen goes black after boot process only displaying the mouse pointer. I can ssh to the pi so I can control it somewhat
Help a sucker out, please!
permissions sudo raspberrypi
add a comment |
So I have made a huge misstake on my Raspberry Pi 3. Trying to edit the access level of some file deep into the /etc dir, I ran the command sudo chmod 444 /etc
without thinking, which now has locked me out of the /etc directory completely. I cannot use sudo because the sudoers file is in /etc, and my use of any command is very limited.
I wonder, is this fixable? From what I have found on the web, the root user of a Raspberry Pi does not have a default password, and as I have not created one I cannot access it either, right? I found somewhere that I should enter recovery mode and change permission from there, but when booting with HDMI cable, the screen goes black after boot process only displaying the mouse pointer. I can ssh to the pi so I can control it somewhat
Help a sucker out, please!
permissions sudo raspberrypi
add a comment |
So I have made a huge misstake on my Raspberry Pi 3. Trying to edit the access level of some file deep into the /etc dir, I ran the command sudo chmod 444 /etc
without thinking, which now has locked me out of the /etc directory completely. I cannot use sudo because the sudoers file is in /etc, and my use of any command is very limited.
I wonder, is this fixable? From what I have found on the web, the root user of a Raspberry Pi does not have a default password, and as I have not created one I cannot access it either, right? I found somewhere that I should enter recovery mode and change permission from there, but when booting with HDMI cable, the screen goes black after boot process only displaying the mouse pointer. I can ssh to the pi so I can control it somewhat
Help a sucker out, please!
permissions sudo raspberrypi
So I have made a huge misstake on my Raspberry Pi 3. Trying to edit the access level of some file deep into the /etc dir, I ran the command sudo chmod 444 /etc
without thinking, which now has locked me out of the /etc directory completely. I cannot use sudo because the sudoers file is in /etc, and my use of any command is very limited.
I wonder, is this fixable? From what I have found on the web, the root user of a Raspberry Pi does not have a default password, and as I have not created one I cannot access it either, right? I found somewhere that I should enter recovery mode and change permission from there, but when booting with HDMI cable, the screen goes black after boot process only displaying the mouse pointer. I can ssh to the pi so I can control it somewhat
Help a sucker out, please!
permissions sudo raspberrypi
permissions sudo raspberrypi
asked Feb 14 at 15:36
Glenn OGlenn O
182
182
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can use another linux machine to mount the microsd card and reset the permissions of /etc
to 755 - sudo chmod 755 /etc
. That should be sufficient.
I don't think it can be done on the broken system itself.
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1118247%2ffix-to-low-permission-etc-raspberry-pi%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
You can use another linux machine to mount the microsd card and reset the permissions of /etc
to 755 - sudo chmod 755 /etc
. That should be sufficient.
I don't think it can be done on the broken system itself.
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
add a comment |
You can use another linux machine to mount the microsd card and reset the permissions of /etc
to 755 - sudo chmod 755 /etc
. That should be sufficient.
I don't think it can be done on the broken system itself.
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
add a comment |
You can use another linux machine to mount the microsd card and reset the permissions of /etc
to 755 - sudo chmod 755 /etc
. That should be sufficient.
I don't think it can be done on the broken system itself.
You can use another linux machine to mount the microsd card and reset the permissions of /etc
to 755 - sudo chmod 755 /etc
. That should be sufficient.
I don't think it can be done on the broken system itself.
answered Feb 14 at 15:54
mikewhatevermikewhatever
24.1k77086
24.1k77086
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
add a comment |
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Is it only applicable for another linux system. Would, say an OSX system be sufficient?
– Glenn O
Feb 14 at 15:57
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
Possibly, but I've never used OSX, so not sure.
– mikewhatever
Feb 14 at 15:59
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
No. You need something that can read and write linux filesystems. There are ways for OSX, but this would require additional software in OSX and I think some of these drivers are not free either. If you only have OSX and your Pi, you could try to boot from another SD card with raspbian (or any other distro) and mount your card using a usb-card-reader. Another way would be to use a virtual maschine.
– allo
Feb 14 at 16:00
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
Thank you so much @mikewhatever! Managed to solve it with another Pi and a SD to USB device!
– Glenn O
Feb 14 at 20:13
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1118247%2ffix-to-low-permission-etc-raspberry-pi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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