Getting error "sudo: illegal option '-n' " while using sudo -n
Issue
sudo -nshows as an illegal option for "-n"- Getting the below error while running the sudo -n command:
sudo -n -H -u root -S /bin/sh -c "echo BECOME-SUCCESS-kdsghndwgxqczwjffjhrdipnrsdzbvcl ; whereis apt-get"
sudo: illegal option `-n'
usage: sudo -h | -K | -k | -L | -l | -V | -v
usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]
{-i | -s | <command>}
usage: sudo -e [-S] [-p prompt] [-u username|#uid] file ...
Environment
- Red Hat Enterprise Linux 8
- sudo
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.