Increase history retention for root

I know the sudo vs root argument. No need to debate that here.

I notice root does not have .profile file. History size is also set at 1000. If I wanted to increase that value and created .profile for root is that considered a security risk, even with correct permissions?

Am I better off creating this in /etc/profile.local and just making it global for all users?

You can create a “.profile” for root.

Whether that’s a security problem, depends on what’s in that profile.

Thanks. That is what I figured, but wanted to make sure I was not missing the obvious.

I should have made one more comment.

If you really, really need to increase the history retention for root, then you are spending far too much time as root.