You are not logged in.

#1 2008-06-13 10:10:44

mrpedroxx
Member
Registered: 2008-06-13
Posts: 4

[SOLVED] sudo and "command not found" problems

Ok, the problem I've got is this: sudo has suddenly started acting real strange. It can't find any programs. For example, if i type

sudo echo

It just goes

sudo: echo: command not found

And another problem I've got, is that as a regular user, it can't find programs in /sbin, or other "exotic" places. For example it can't find firefox, because it's not in /usr/bin or /bin, but in /opt/mozilla/bin.
Please, help me!

Last edited by mrpedroxx (2008-06-14 13:23:49)

Offline

#2 2008-06-13 10:42:47

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 339

Re: [SOLVED] sudo and "command not found" problems

Sounds like your system is a bit broken. /opt/mozilla/bin should be in your path.
Can you post the output of these three commands.

sudo -V

$PATH

pacman -Q firefox

Also you may want to have a look at '/var/log/errors.log' as root to see if something bad is going on with your hard disk.

Last edited by shazeal (2008-06-13 10:43:46)

Offline

#3 2008-06-13 10:54:36

mrpedroxx
Member
Registered: 2008-06-13
Posts: 4

Re: [SOLVED] sudo and "command not found" problems

sudo -V outputs this

Sudo version 1.6.9p15

$PATH outputs

bash: /usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.: No such file or directory

pacman -Q firefox outputs

firefox 2.0.0.7-1

Yeah, maybe I should update it anyway smile
And /var/log/errors.log does contain stuff about hard disks, but it's just me mounting my iPod and the Windows partition on my hd big_smile

Offline

#4 2008-06-13 11:03:26

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 339

Re: [SOLVED] sudo and "command not found" problems

Yep your path is messed up. Really badly lol

Its missing /sbin:/usr/sbin:/opt/mozilla/bin

Are you setting your path somewhere else like ~/.bashrc ?
If you are put ':$PATH' on the end of the line you are setting it on.

If you arent and somehow your path is just messed up as a temporary fix open up ~/.bashrc with a text editor and put

PATH=/sbin:/usr/sbin:/opt/mozilla/bin:$PATH

Log out and back in and it should be right again. Im guessing you are setting the PATH variable somewhere though as you have a couple of custom paths in there.

Offline

#5 2008-06-13 11:15:48

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: [SOLVED] sudo and "command not found" problems

I would highly suggest updating your system (pacman -Syu).  Reinstall the filesystem package and you will get the default version of /etc/profile which should fix your path problems.

Offline

#6 2008-06-13 11:26:37

mrpedroxx
Member
Registered: 2008-06-13
Posts: 4

Re: [SOLVED] sudo and "command not found" problems

Ok, I'll try to update. But thanks shazeal, that solved the problem, at least temporarily. Though not on sudo..
But now, off to updating! smile

Offline

#7 2008-06-13 12:54:59

mrpedroxx
Member
Registered: 2008-06-13
Posts: 4

Re: [SOLVED] sudo and "command not found" problems

Everything working now, thanks guys! smile

Offline

Board footer

Powered by FluxBB