.bash_profile Root - SLES12sp3

Our Security group will be installing Qualys to scan for vulnerabilities and compliance.

This of course will fill up our bash History. No … please!!

I found the fix below in the Qualys documentation. However I cannot find the .bash_profile for root. Any ideas? Thank you.

To prevent putting Qualys commands in root’s history file, add the following to the bottom of the root user’s .bash_profile:

Added to stop Qualys filling up history

loginUser=logname

if [ ${loginUser} == qualys ]; then

export HISTFILE=~/.qualys_history

fi

[QUOTE=kbannister;58631]Our Security group will be installing Qualys to scan for vulnerabilities and compliance.

This of course will fill up our bash History. No … please!!

I found the fix below in the Qualys documentation. However I cannot find the .bash_profile for root. Any ideas? Thank you.

To prevent putting Qualys commands in root’s history file, add the following to the bottom of the root user’s .bash_profile:

Added to stop Qualys filling up history

loginUser=logname

if [ ${loginUser} == qualys ]; then

export HISTFILE=~/.qualys_history

fi[/QUOTE]

According to the Administration Guide you can use ‘~/.profile’ for that.

I don’t think the root user has a .bash_profile by default - but that does not stop you from creating one. Or using ~/.profile.

I’m curious how the loginUser variable gets populated?