Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a RHEL 5 machine on which I'm trying to run sudo.
I have created a test-eng user and added it in the sudoers file. The sudoers file have the correct permissions 0440. The output of sudoers file is :
User_Alias FULLTIME=test-eng
FULLTIME ALL=(ALL) NOPASSWD: ALL
I have given the correct setuid permissions to sudo as well. But when i run sudo after logging in from the test-eng user I get permission denied. Have tried almost everything but it doesn't work.
/usr/bin/sudo: Permission denied.
Also the same thing worked for me on a 64 bit machine and this one is a 32 bit machine. So I'm wondering whether this might be a 32/64 bit issue. Please help.
The error you report sounds like a basic file permission problem--that user "test-eng" is denied read permission, execute permission, or both for the sudo command.
So, what are the permissions on the actual sudo file? On my Ubuntu 10.04 system:
The error you report sounds like a basic file permission problem--that user "test-eng" is denied read permission, execute permission, or both for the sudo command.
So, what are the permissions on the actual sudo file? On my Ubuntu 10.04 system:
The error you report sounds like a basic file permission problem--that user "test-eng" is denied read permission, execute permission, or both for the sudo command.
So, what are the permissions on the actual sudo file? On my Ubuntu 10.04 system:
I copied it from another machine on which it was working fine
No, no... don't do that Install it using the RHEL package manager. It's probably something like:
Code:
yum install sudo
Otherwise, download, compile, and install a source code version: Sudo download page
Do not copy an executable from one machine to another unless the machines are identical. Even then, you probably would miss some support files (e.g. visudo which you must use to configure sudo properly).
Quote:
Originally Posted by ankgup87
I think sudo has to have 4111 permissions to have the other users use root uid.
You can change the permissions to whatever you like. All I will say is that the permissions I provided are the exact permissions on my sudo command for my Ubuntu box. My sudo works fine on that machine. RHEL might be different.
EDIT:
Quote:
Originally Posted by ankgup87
/usr/bin/sudo: Exec format error. Wrong Architecture.
That's a clear indication that the problem is an inconsistency between the source machine and the destination machine. It could be 32/64 bit incompatibility, it could be that one machine is Intel/AMD and the other is ARM/PowerPC, etc.
Last edited by Dark_Helmet; 02-29-2012 at 12:28 AM.
What does "file /usr/bin/sudo" says. Because "/usr/bin/sudo: Exec format error. Wrong Architecture." error points an architectural mismatch. (Like trying to run 64-bit sudo on 32-bit system).
What does "file /usr/bin/sudo" says. Because "/usr/bin/sudo: Exec format error. Wrong Architecture." error points an architectural mismatch. (Like trying to run 64-bit sudo on 32-bit system).
file /usr/bin/sudo says:
/usr/bin/sudo: setuid ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), for GNU/Linux 2.4.0, stripped
And this is a 32 bit machine. I think that is the problem. Right?
No, no... don't do that Install it using the RHEL package manager. It's probably something like:
Code:
yum install sudo
Otherwise, download, compile, and install a source code version: Sudo download page
Do not copy an executable from one machine to another unless the machines are identical. Even then, you probably would miss some support files (e.g. visudo which you must use to configure sudo properly).
You can change the permissions to whatever you like. All I will say is that the permissions I provided are the exact permissions on my sudo command for my Ubuntu box. My sudo works fine on that machine. RHEL might be different.
EDIT:
That's a clear indication that the problem is an inconsistency between the source machine and the destination machine. It could be 32/64 bit incompatibility, it could be that one machine is Intel/AMD and the other is ARM/PowerPC, etc.
Thanks. I will try to install a fresh sudo and will update the results
EDIT:
I downloaded a new sudo for 32 bit and it worked.
I will make sure I don't copy it from another machine of a different configuration.
Thanks for your help Dark Helmet. Marking this thread as RESOLVED.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.