why do I see this?
Hi,
Out of nowhere, but now every time I log-in as root I get this output to stdout: Code:
[yaximik@G5NNJN1 ~]$ su - Code:
[root@G5NNJN1 ~]# ls |
I'm thinking its your default shell for root? What shell does root have set on the /etc/passwd file? The "-" part of su - means to take on the settings of the users profile as if you logged in to that account directly, so it sources the .bashrc .bash_profile and so on, without the - it retains the current users shell, variables, etc..
|
After looking at the output more it looks like root might, for some reason, have /bin/bash set in debug mode. This is usually done with the -x option to debug shell scripts. Try the following as the root user:
Code:
---------- Post added 12-20-12 at 03:34 PM ---------- http://tldp.org/LDP/Bash-Beginners-G...ect_02_03.html |
Looks more like "-v" than "-x" ("-x" would not have printed comment lines), and "set +v" would clear it up. But, you will still need to track down where that "-v" option is getting set in the first place.
|
Good catch on the comments, I never use debug or verbose with Bash. The +v is the correct answer it looks like.
|
It's clearly because somewhere shell debug command i.e. set is set in root's shell initialization file. In order to avoid this, simply comment (put a # against the entry) the line containing set -vx (or either option associated with set) from corresponding file, as:
Code:
grep 'set' .bashrc .profile .login |
[SOLVED] Why do I see this?
:) Thanks everyone who responded. Indeed, it was as simple as commenting out 'set -xv' in root's .bash_profile. I guess the issue was I do not remember setting this to on, otherwise I would know how to set it back to off. It got to be a goblin in my box, I hope it will not do something more malicious next time.
|
All times are GMT -5. The time now is 09:52 PM. |