Errors 'a plenty
I believe all the errors below are related since they started at about the same time, that's why I thought it would be more useful to post them all in one post, as it might bring more insight in what is causing the problem.Error Nr 1 (BASH commands not found)
Every time I start up a session in SSH (disabled root login) I get this:
PHP Code:
-bash: id: command not found
-bash: [: =: unary operator expected
-bash: id: command not found
-bash: dircolors: command not found
-bash: id: command not found
-bash: [: =: unary operator expected
-bash: tr: command not found
-bash: tr: command not found
-bash: whoami: command not found
-bash: mesg: command not found
-bash: dircolors: command not found
(would this stop some cpanel crons from running? I got some emails like:
/bin/sh: line 1: /usr/bin/python2: Permission denied
/bin/sh: line 1: anaconda-ks.cfg: command not found
Here are some subject email headers:
PHP Code:
Here are some Subject Email Headers:
Cron <mailman@_______> /usr/bin/python2 -S /usr/local/cpanel/3rdparty/mailman/cron/disabled
Cron <mailman@_______> /usr/bin/python2 -S /usr/local/cpanel/3rdparty/mailman/cron/senddigests
Cron <mailman@_______> /usr/bin/python2 -S /usr/local/cpanel/3rdparty/mailman/cron/checkdbs
PHP Code:
ls -l python2
lrwxr-xr-x 1 root root 6 Mar 3 03:16 python2 -> python*
PHP Code:
ls -l python
-rwxr-xr-x 2 root root 795584 Aug 8 2003 python*
PHP Code:
-rwxr-xr-x 1 mailman mailman 8194 Mar 2 14:40 /usr/local/cpanel/3rdparty/mailman/cron/disabled*
Error Nr 3 : Awstats not working
PHP Code:
AwStats used to work fine, but now I get this message:
Code:
Content-type: text/html
Internal Server Error
Unable to open document (./awstats.pl) at cpaneld.pl line 1228
main::dodoc() called at cpaneld.pl line 516
In cPanel this is displayed:
PHP Code:
Disk usage :Serious problem while fetching quota data (quota): Permission denied (-1) Megabytes
Does anyone know where this may come from? I made some changes to several things such as
PHP Code:
1 ) chmod -R 700 /etc/rc.d/init.d/*
PHP Code:
2 ) chmod 700 /bin/rpm
PHP Code:
3 ) chattr + i /etc/passwd , /etc/shadow, /etc/group, /etc/gshadow, /etc/services
PHP Code:
4 ) edited /etc/fstab : /home + nosuid,nodev
PHP Code:
5) edited /etc/host.conf
order bind,host
multi on
nospoof on
PHP Code:
6 ) edited /etc/inetd.conf, commented telnet, talk, ntalk
PHP Code:
7 ) edited /etc/profile TMOUT=3600
PHP Code:
8 ) edited /etc/login.defs PASS_MIN_LEN changed to 8
PHP Code:
9 ) disabled talk,ntalk in /etc/xinetd.d/talk, ntalk
PHP Code:
10 ) cd /usr/bin/
chmod 000 perlcc byacc yacc bcc kgcc cc gcc i386*cc
chmod 000 *c++ *g++
chmod 000 /usr/lib/bcc /usr/lib/bcc/bcc-cc1
Thanks!
This is the contents of my .bashrc file for the user I log in with :
PHP Code:
Code:
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
Here is /etc/bashrc if needed:
PHP Code:
Code:
# /etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
# For some unknown reason bash refuses to inherit
# PS1 in some circumstances that I can't figure out.
# Putting PS1 here ensures that it gets loaded every time.
alias which="type -path"
export EDITOR="pico"
export VISUAL="pico"
PS1="\u@\h [\w]# "
whoami=`whoami`
if [ -e "~/.dns" ]; then
DNS=`cat ~/.dns`
PS1="\u@$DNS [\w]# "
else
if [ -e "/var/cpanel/users/$whoami" ]; then
eval `grep DNS= /var/cpanel/users/$whoami`
if [ ! "$DNS" = "" ]; then
echo -n "$DNS" > ~/.dns
PS1="\u@$DNS [\w]# "
fi
fi
fi
if [ ! -e ~/public_html/cgi-bin ]; then
mkdir -p ~/public_html/cgi-bin
fi
if [ ! -e ~/public_ftp ]; then
mkdir -p ~/public_ftp
fi
mesg y
alias wtf="watch -n 1 w -hs"
alias wth="ps -uxa | more"
# Now for the dos users
alias dir="ls"
alias copy="cp"
alias del="rm"
alias deltree="rm -r"
alias move="mv"
alias ff="whereis"
alias attrib="chmod"
alias edit="pico"
alias chdir="cd"
alias mem="top"
alias search="grep"
alias pico="pico -w -z"
LS_OPTIONS='--color=tty -F -a -b -T 0';
export LS_OPTIONS;
alias ls='/bin/ls $LS_OPTIONS';
alias dir='/bin/ls $LS_OPTIONS --format=vertical';
alias vdir='/bin/ls $LS_OPTIONS --format=long';
alias d=dir;
alias v=vdir;
eval `dircolors -b`
export JAVA_HOME=/usr/local/jdk
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip
export PATH="$PATH:/usr/local/bin:/usr/X11R6/bin"
#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>/dev/null
fi
#cPanel Added Limit Protections -- END
