Nevermind, it may not have been the most elegant solution but I ended up booting into a live disk and deleting the file from there. All back to normal. Thanks.
P.S. Claydo, thanks for the info, I'm still trying to wrap my head around the man pages for visudo and also accessing root.
Announcement
Collapse
No announcement yet.
How do I delete a locked file I created in sudoers.d?
Collapse
This topic is closed.
X
X
-
I was trying to replicate a hack I copied from oshunluver about a year back or so, on my previous laptop, to enable updates and upgrades without having to enter a password. (it also involved creating an alias). Anyway, I created a file in sudoers.d that is corrupt and now when I try to do updates and upgrades I get error messages regarding that file.
- Top
- Bottom
Leave a comment:
-
Code:claydoh@claydoh-Elite-8300:~/Downloads$ sudo cat /etc/sudoers.d/README [sudo] password for claydoh: # # As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on # installation of the package now includes the directive: # # #includedir /etc/sudoers.d # # This will cause sudo to read and parse any files in the /etc/sudoers.d # directory that do not end in '~' or contain a '.' character. # # Note that there must be at least one file in the sudoers.d directory (this # one will do), and all files in this directory should be mode 0440. # # Note also, that because sudoers contents can vary widely, no attempt is # made to add this directive to existing sudoers files on upgrade. Feel free # to add the above directive to the end of your /etc/sudoers file to enable # this functionality for existing installations if you wish! # # [B]Finally, please note that using the visudo command is the recommended way[/B] #[B] to update sudoers content, since it protects against many failure modes.[/B] # [B]See the man page for visudo for more information.[/B] #
I will assume that visudo was used to make the changes to begin with?
- Top
- Bottom
Leave a comment:
-
NO!!!!
First, sudoers.d is a directory. Second, DON'T. Period.
- Top
- Bottom
Leave a comment:
-
Be careful
Navigate to the file location in Dolphin
Right click space and from the menu select > open terminal here
Type: su
hit enter
Now enter your password
Code:rm <filename>
- Top
- Bottom
Leave a comment:
-
How do I delete a locked file I created in sudoers.d?
Title says it all, how do I rm a locked file in sudoers.d?Tags: None
- Top
- Bottom
Leave a comment: