Major OS errors/Bash errors help!!!!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Major OS errors/Bash errors help!!!!
# 8  
Old 11-13-2007
Quote:
Originally Posted by wcmmlynn
So wondering how to get /bin and /usr/bin back in the path?
More importantly, why did you lose them, root starts up the system and must have those in it's path else it won't start, somewhere along the line I reckon somebody stuffed up a "PATH=" line.
# 9  
Old 11-13-2007
Who knows. We installed Flash Media Server (CRAP!) and then SeaMonkey RPMs and then... kaboom!

How do I fix? Any idea?
# 10  
Old 11-13-2007
The first step would be to go through all the files in /etc looking for "PATH=" but if you don't know what you are looking for you could cause more harm than good.

What is does

Code:
echo $HOME

say?

and also

Code:
echo $HOME/.*

looking to see if there is a .login, .profile or similar.
# 11  
Old 11-13-2007
Result:

root@host [/bin]# echo $HOME
/root
root@host [/bin]# echo $HOME/.*
/root/. /root/.. /root/.bash_history /root/.bash_logout /root/.bash_profile /root/.bashrc /root/.cpanel /root/.cpmysqlrpm /root/.cpobjcache /root/.cshrc /root/.forward /root/.gnupg /root/.ivy /root/.mailcap /root/.mime.types /root/.MirrorSearch /root/.mozilla /root/.mplayer /root/.my.cnf /root/.mysql_history /root/.pearrc /root/.rnd /root/.spamassassin /root/.ssh /root/.tcshrc
# 12  
Old 11-13-2007
I suggest you start with /root/.bash_profile, have a look and see if it has PATH=.... in it.
# 13  
Old 11-13-2007
/etc/profile script contains the following:

#cPanel Added Limit Protections -- BEGIN

#unlimit so we can run the whoami
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null

LIMITUSER=$USER
if [ -e "/usr/bin/whoami" ]; then
LIMITUSER=`/usr/bin/whoami`
fi
if [ "$LIMITUSER" != "root" ]; then
ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
else
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/de$
fi
#cPanel Added Limit Protections -- END

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|Smilie$1($|Smilie" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after




/root/.bash_profile had 1 PATH call, I added 2 more. I fear rebooting though or god knows what will happen...


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
PATH=$PATH:/sbin
PATH=$PATH:/usr/sbin
export PATH
unset USERNAME
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

New bash menu printing errors but closes too quickly

I am beginning to write a new version of the bash menu below. The previous version worked great and now when I start the updated bash it opens and a some lines print in the terminal and it closes quickly. I know there are errors but how can I see them or fix them, I tried set -x with the same... (12 Replies)
Discussion started by: cmccabe
12 Replies

2. Ubuntu

Bash to Ash, errors and adjustments

I wrote Bash script and now I want to convert it to Ash. One headache is this function: do_adduser() { setaddprompt _arr_add=("Add manually" "Add via TXT" "return to main menu" "exit program") select add_action in "${_arr_add}" do case "$REPLY" in 1)... (7 Replies)
Discussion started by: fzivkovi
7 Replies

3. Shell Programming and Scripting

Converting from Linux bash (GNU) to Solaris script syntax errors

Original script written on CentOS 6.3 with GNU bash 4.1.2 Destination system is Solaris 9 with GNU bash 2.05 (not changeable by me) I have a script written on the linux side but now we need to provide a version to another site that "doesn't like linux". I've been going through changing the ] or... (13 Replies)
Discussion started by: oly_r
13 Replies

4. Shell Programming and Scripting

Bash script errors when executing

I'm working on a script that will search through a directory for MKV files and remux them to MP4. I found a few other scripts around the net that do this, but they all have limitations that don't always get the job done. The main limitation I've found is that most scripts look for the video track... (2 Replies)
Discussion started by: rayne127
2 Replies

5. Shell Programming and Scripting

Errors in bash with if statements

Hello everyone, I got this type of error when programming in bash new.bat: 16: cannot create : Directory nonexistent $bool new.bat: 37: Syntax error: "then" unexpected (expecting "fi") Does anyone know why? Here is my code #!bin/bash #function helps(){... (4 Replies)
Discussion started by: bbbash
4 Replies

6. UNIX for Advanced & Expert Users

Bash/Unix Command Errors

Hi all, I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: # root@host # pwd /bin... (0 Replies)
Discussion started by: wcmmlynn
0 Replies

7. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

8. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies

9. HP-UX

errors

fatal server error: couldn't open x pointer device! is one attached? xinit: connection refused (errno 239): unable to connect to X server xinit: no such process (errno3): server error. (1 Reply)
Discussion started by: nobody
1 Replies

10. Filesystems, Disks and Memory

Help with errors

I am very new to the world of Unix, in the middle of a crash course as I write this due to a system failure for my company. This system went down approximately 24 hours ago due to some apparent thunderstorms that passed through. The problem is that my company, like many others, has laid off... (5 Replies)
Discussion started by: Phaedirean
5 Replies
Login or Register to Ask a Question