[SOLVED] Getting permission denied when running "sudo bash"
Red HatThis forum is for the discussion of Red Hat Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
yup I've checked the /, /bin and even each of the binaries for which I get permission denied and of course the files that bash is sourcing (for what I can gather it's sht standard .bashrc without anythng peculiar), maybe I've missed something? The weird thng is if I run /bin/bash as root or as example user everything is initialized correctly without error messages.
On a side note out of deperation I even checked attributes for /bin/bash, su and sudo comparing with another running system, RHEL 5.3, and even in that department everything seems fine.
I think the problem is somehow bound to sudo/su as I get these errors only when trying to use these tools but honestly cannot see where or what can cause this.
Ok with some calm I've been finally to spot the bas... err the problem
In the sudoers configuration someone had implemented/activated the NOEXEC option as per sudoers manual :
If sudo has been compiled with noexec support and the underlying operating system supports it, the NOEXEC tag can be used to prevent a dynamically-linked executable from running further commands itself.
In the following example, user aaron may run /usr/bin/more and /usr/bin/vi but shell escapes will be disabled.
aaron shanty = NOEXEC: /usr/bin/more, /usr/bin/vi
See the PREVENTING SHELL ESCAPES section below for more details on how NOEXEC works and whether or not it will work on your system.
Well I'm glad this is solved and that I finally decided to subscribe to the community, been a serial lurker for years
Thanks everybody for pointers and helping me solve this, even if indirectly