1

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

Rich
  • 1,333
  • 5
  • 27
  • 39

1 Answers1

2

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!

dunxd
  • 9,482
  • 21
  • 80
  • 117
  • 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