Comments 4 Posted In Red Hat Enterprise Linux sudo: sudosh: command not found on RHEL 8.1 Latest response 2020-01-24T19:43:53+00:00 I have encountered this error after upgrading my RHEL from 8 to 8.1. Anyone has similar experience? sudo: sudosh: command not found SG Started 2020-01-10T16:33:05+00:00 by Shisheer Guragain Pro 785 points Log in to join the conversation Responses Sort By Oldest Sort By Newest Guru 1558 points 12 January 2020 8:28 PM Dusan Baljevic Hi Shisheer, Can you provide details of the complete SUDO command you are trying to run? It appears you are trying to run some command with name "sudosh". If so, verify if the command exists: # updatedb && locate sudosh Regards, Dusan Baljevic (amateur radio VK2COT) Guru 13549 points 12 January 2020 8:36 PM RJ Hinton Community Leader Shisheer, ADDED/UPDATED Sisheer, I could not find "sudosh" for RHEL 8. Did you install it from a different repository that was not from Red Hat? Or did you perhaps mean you are attempting to run sudo sh? It is generally a bad practice to give a sudo rule to a shell of any kind. This effectively bypasses sudo control and effectively gives root to the person with such a non-best-practice sudo rule. See the pdf link to a very good guide in my next post if you really did mean sudo sh and not sudo sudosh. If you really intend to allow someone you legitimately trust to have sudo root access, consider adding them to the %whell directive in the /etc/sudoers file, and add them to the wheel group in /etc/group. Make sure it is documented if you are in a corporation with whatever person or office is responsible for security. Please also try this command along with the good tips from Dusan above (Thanks Dusan). spoiler This next command produced nothing on my brand new RHEL 8.1 system I built yesterday with proper subscriptions and repositories. However, it is useful when you want to find an rpm for any given command and you're not sure where the command is located. yum provides */sudosh Before doing that command know that "sudosh" is probably not provided standard from Red Hat: Make sure your network is active (try pinging ping www.google.com (if you can see the public internet, or pick some other reasonable ping choice). Make sure your system is properly subscribed (if it isn't already) with subscription-manager status Make sure your yum repositories work with yum repolist and that it produces valid results (repos with a number of rpms in each repository) Regards RJ Guru 13549 points 12 January 2020 8:46 PM RJ Hinton Community Leader Shisheer, The man page for sudoers is one of the best documented man pages in existence. If your issue persists, please post the relevant portion of your /etc/sudoers file (you do not have to post the entire file) here for us to help further. # quick way for bob to use systemctl # This would allow the user bob on the system 192.168.0.222 to run systemctl for httpd bob 192.168.0.222 = (root) /bin/systemctl [-A-Za-z]* httpd The above example assumes only the need for one sudo directive for one user. If you intend on allowing this for many users, you may wish to create the proper use of "User_Alias, Host_Alias, Cmnd_Alias and Runas_Alias, then making a proper line for that. The man page for sudoers is actually quite helpful! Note here is a relevant guide from 2014 on avoiding common pitfalls with sudo. This is a very effective guide even though it is from 2014 that will enable a security conscious admin avoid many pitfalls. Regards RJ SG Pro 785 points 24 January 2020 7:43 PM Shisheer Guragain Hello All, I was able to fix the issue. I had an automated script to fetch the sudosh tar and install it, somehow, there was one thing that wasn't configured right. Appreciate all the suggestions.