# .bash\_profile Root - SLES12sp3

**URL:** <https://forums.suse.com/t/bash-profile-root-sles12sp3/34450>\
**Category:** SLES Configure-Administer\
**Created:** [October 9, 2019, 8:43pm UTC](https://forums.suse.com/t/bash-profile-root-sles12sp3/34450 "2019-10-09T20:43:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbannister](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@kbannister](https://forums.suse.com/u/kbannister)\
**Post date:** [October 9, 2019, 8:43pm UTC](https://forums.suse.com/t/bash-profile-root-sles12sp3/34450/1 "2019-10-09T20:43:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![strahil-nikolov-dxc](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@strahil-nikolov-dxc](https://forums.suse.com/u/strahil-nikolov-dxc)\
**Post date:** [October 10, 2019, 6:05am UTC](https://forums.suse.com/t/bash-profile-root-sles12sp3/34450/2 "2019-10-10T06:05:57Z")

</div>

[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](https://documentation.suse.com/sled/12-SP4/single-html/SLED-admin/#sec-adm-configfiles) you can use ‘~/.profile’ for that.

---

<div class="post-metadata">

**Author:** ![David1](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@David1](https://forums.suse.com/u/David1)\
**Post date:** [August 31, 2020, 6:38pm UTC](https://forums.suse.com/t/bash-profile-root-sles12sp3/34450/3 "2020-08-31T18:38:36Z")

</div>

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?
