how to remove file from sudores.d folder

Jasaida
Jasaida used Ask the Experts™
on
In ubuntu 16:
it's added a wrong file in /etc/sudores.d/ folder.
I can't do sudo form any user. I can't do any thing.
How can I remove this file from folder sudores.d.
can I remove file if I login in as recover mode?

HELP
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Engineer
Distinguished Expert 2018
Commented:
You can try to boot using init=/bin/bash on the kernel command line.
Then  when the shell prompt appears: rm /etc/sudoers.d/offending.file
(You may still need to remount the root filesystem rw   mount -o remount,rw /)
Distinguished Expert 2017

Commented:
su -

and login with the root password


on console, login with root.

Author

Commented:
Thank you noci, extremely Helpful.
nociSoftware Engineer
Distinguished Expert 2018

Commented:
It might help to assign a secure  long password to the root account and then lock that password is a sealed enveloppe in a vault.
Secure is f.e. generated using: pgwen 25
pwgen: https://sourceforge.net/projects/pwgen/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial