Link to home
Start Free TrialLog in
Avatar of Paulmul
Paulmul

asked on

Traceroute Redhat 9

Hi,

I'm a bit of a linux newbie but need to use it for a college project. What I need to know is, why is it I can not use traceroute when I log in as me but I can when I log in as root? How do I go about changin this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of liddler
liddler
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Paulmul
Paulmul

ASKER

Can you explain that a bit more? When I typed that it said to few arguements. Do I have to be logged in as root?  what is a+s and path/to/traceroute?

Thanks
Yes u have to be root
a+s on chmod means All plus SetUID, i.e. let all users run this command like the commands owner (root).
Sorry /path/to is a convention not a literal -  /path/to/traceroute means wherever your tracerouter  is located
for example
/usr/bin/traceroute
/usr/local/bin/tracroute
/etc/traceroute

type:
which traceroute
to find where yours is
A lot of tools like traceroute can be placed in your /sbin directory.  Most users don't have the /sbin added to their path. I don' t know about RH9 but you could also try
/sbin/tracroute

also to find out where traceroute is do this as root
which traceroute


good luck
willy
Avatar of Paulmul

ASKER

So can I type a+s or is it * SetUID?

Thanks
1. login as a root and type this command.
#which traceroute

2. check the answer for 1(suppose it is /sbin/traceroute).
#chmod a+s /sbin/traceroute

then u can login as yourself and try the traceroute command.
Avatar of Paulmul

ASKER

I accepted that a little prematurely. Traceroute still does not work. It just says Bash: Traceroute: command not found.

Any ideas?
type:
which traceroute
if it says:
/sbin/traceroute
type
/sbin/traceroute <IP address>
You can modify your PATH variable
PATH=$PATH:/sbin
export PATH
so you can then type just traceroute, however this will only work while you are logged in, you need to update your .profile file in your home directory, by adding the PATH lines above
Avatar of Paulmul

ASKER

When I type which traceroute (in user) it says traceroute not found and lists some directories. I know it is in /usr/sbin. I checked but it can not see it.

Avatar of Paulmul

ASKER

It's okay, I got it now.

Thank you.