# root problem...



## su (Sep 25, 2010)

yesterday I install freebsd for first time... After some time I done something wrong and now I can do anything as root 

whatever I tried (as root) system replied to me with "Command not found"

any help?! thanks!


----------



## UNIXgod (Sep 25, 2010)

quick google search for ya:
http://www.sal.wisc.edu/~jwp/wiyn/wiynro/errors/cmdnotfound.html


----------



## su (Sep 25, 2010)

"whatever I tried (as root) system replied to me with "Command not found""


```
#whereis
whereis: Command not found
```

this is not working in my case...


----------



## Beastie (Sep 25, 2010)

Did you remove /bin or something?


----------



## su (Sep 25, 2010)

nothing delete, nothing has been removed... 

after I finished installing, i logon and everything was ok... than I logon using PuTTY from another PC with "wheel group" user account and switch to "root" using "su"... I tried to install Apache server, but for a moment I quit "root" typing "exit" and after that I can't to anything under "root", aether from console or remote PC...

something to do or to reinstall? this is fresh and my first freebsd installation. there is no problem to install os again.. but, it will be nice to now what happend and how can correct that... just for further using... 

p.s. sorry for bad english...


----------



## ohauer (Sep 25, 2010)

what does the command
`# /bin/echo $PATH` shows as output?


----------



## su (Sep 25, 2010)

```
# /bin/echo $PATH
/usr/local/apache/bin:/usr/local/mysql/bin
```


----------



## su (Sep 25, 2010)

*Thanks*



			
				ohauer said:
			
		

> what does the command
> `# /bin/echo $PATH` shows as output?



I corrupt my environment variable while I was preparing for Apache install!

I just set new one...


```
# set VAR=VALUE
# set X = 5
# set vech=Car
# set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
```

including those for apache and mysql...


Thanks again....


----------



## kpa (Sep 25, 2010)

Leave root's environment alone, don't touch anything under /root unless you really have to. Set up security/sudo for running programs with root's priviledges.


----------

