Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Since a couple of days ago my Ubuntu 12.04 installation is presenting some strange behavior, due to auto update probably, as I've not messing with any config: 1 - The system default encoding changed from UTF-8 to ANSI_X3.4-1968 - I've never heard of such encoding :[ 2 - Typing 'ifconfig' resulted in "The command could not be located because '/sbin' is not included in the PATH"

I tried to set-up locale configurations by many means, with no success, then I concluded that the wrong PATH settings could be the cause. I've probed all the files where PATH could be set, and still couldn't find where it chages:

user@pc~> grep PATH /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
user@pc~> grep PATH /etc/bash.bashrc
user@pc~> grep PATH /etc/profile
user@pc~> grep PATH ~/.bash
grep: /home/likewise-open/user/.bash: No such file or directory
user@pc~> grep PATH ~/.bashrc
user@pc~> grep PATH ~/.pam_environment
user@pc~> grep PATH ~/.profile
# set PATH so it includes user's private bin if it exists
    PATH="$HOME/bin:$PATH"
user@pc~> grep PATH ~/.bash_profile
grep: /home/likewise-open/user/.bash_profile: No such file or directory
user@pc~> grep PATH ~/.bash_login
grep: /home/likewise-open/user/.bash_login: No such file or directory
user@pc~> echo $PATH
/home/likewise-open/user/bin:/usr/lib/lightdm/lightdm:/usr/local/bin:/usr/bin:/bin

Some how my company-imposed likewise-open puts itself in the PATH, and the proper locations are removed, but where? Any tips?

share|improve this question
1  
Try grep PATH= ~/.* /etc/*. If that doesn't help, grep -RI PATH= ~ /etc. –  sudo Mar 25 '13 at 15:10
1  
Bear in mind that /sbin is normally not in normal users' paths, only in root's. In any case, all you need to do is define your path in your .bashrc and add /sbin to it. –  terdon Mar 25 '13 at 15:25
    
@terdon: I don't know about other distributions, but /sbin is in every user's default path on Ubuntu 12.04. –  sudo Mar 25 '13 at 15:34
    
@Dennis "Normally, these directories are never part of normal user's $PATHs, only of roots" tldp.org/LDP/Linux-Filesystem-Hierarchy/html/sbin.html. –  terdon Mar 25 '13 at 15:50
    
grepping didn't showed me where the path is being broken, so I just added the missing entries to my ~/.profile - my language settings are still invalid though. changing locale settings by GUI crashes the accounts-daemon - and by CLI nothing has effect - but that's another topic. –  gabriel_agm Mar 25 '13 at 18:03

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.