Title says it all, how do I rm a locked file in sudoers.d?
Announcement
Collapse
No announcement yet.
How do I delete a locked file I created in sudoers.d?
Collapse
This topic is closed.
X
X
-
Just lurking around, but for a single command, wouldn't it be better to just usesudo rm filename??
Is it a good idea to delete sudoers.d??Multibooting: Kubuntu Noble 24.04
Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
Win XP, 7 & 10 sadly
Using Linux since June, 2008
- Top
- Bottom
Comment
-
NO!!!!
First, sudoers.d is a directory. Second, DON'T. Period.Windows no longer obstructs my view.
Using Kubuntu Linux since March 23, 2007.
"It is a capital mistake to theorize before one has data." - Sherlock Holmes
- Top
- Bottom
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
Comment
-
Originally posted by Snowhog View PostNO!!!!
First, sudoers.d is a directory. Second, DON'T. Period.If you think Education is expensive, try ignorance.
The difference between genius and stupidity is genius has limits.
- Top
- Bottom
Comment
-
Windows no longer obstructs my view.
Using Kubuntu Linux since March 23, 2007.
"It is a capital mistake to theorize before one has data." - Sherlock Holmes
- Top
- Bottom
Comment
-
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.If you think Education is expensive, try ignorance.
The difference between genius and stupidity is genius has limits.
- Top
- Bottom
Comment
-
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.If you think Education is expensive, try ignorance.
The difference between genius and stupidity is genius has limits.
- Top
- Bottom
Comment
Comment