SSH without root environment variables exported on CentOS 5.8 + SELinux
I have a server on CentOS 5.8 + SELinux. The problem is that environment variables are not set up at login time through SSH. For example:
1. I login through SSH as a regular user.
2. su as root.
3. Trying to use any command from /sbin without the full path.
4. I get a "bash: *: command not found" error.
If I do "source /etc/profile" I can use the commands from /sbin without specifying the full path.
It is not because of SELinux. I disabled it and got the same result. On CentOS 6.3 I didn't have this problem. The OpenSSH version was a newer one though. Don't remember which.
How can I solve this?
uname -r: 2.6.18-308.el5xen