Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two machines. On one, a non-root user can run ethtool and gets output, on the other machine the same user gets sh: ethtool: command not found.

If I sudo su - to be root, then ethtool is indeed there, so it must be a privs issue, perhaps the sudoers file?

I would like ethtool to be runnable by this user on the second machine.

I'm running RHEL4 on the first machine and RHEL5 on the second.

How can I make ethtool runnable (without needing to sudo) on the RHEL5 machine?

Thanks in advance

Rich

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Could be that the directory where ethtool is located is not on the user's path.

To check the path:

echo $PATH

To locate ethtool

find / -name ethtool

You may need to run the above as root, in case the user doesn't have permission to access the directory ethtool is in. Once you have found ethtool, and made sure its directory is in the users path, you can then check the permissions on the folder and ethtool itself.

ls -l /path_to_ethtool_directory
ls -l /path_to_ethtool_directory/ethtool

Hope that helps!

share|improve this answer
    
That hadn't occurred to me! Thanks! –  Rich Sep 27 '10 at 13:02
1  
@Rich: $PATH should be in all-caps. You can try locate ethtool or sudo which ethtool which, if they find it will be much faster than running find. Chances are very good that it's in /usr/sbin which is usually in root's PATH but not in a regular user's. Just do PATH=$PATH:/usr/sbin in the user's ~/.profile or ~/.bashrc depending on their shell and how that start it. –  Dennis Williamson Sep 27 '10 at 14:42
    
+1 for suggesting actual location of file, and for correcting my case :-) Answer corrected. –  dunxd Sep 27 '10 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.