Cannot Get TMOUT (autologout) To Work For User Root

I am running Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

I am required to set the TMOUT variable for the root user so that root
will be logged out automatically, after 5 minutes of inactivity.

I have inserted the following into both /.bash_profile as well as the /.profile for root user:

export TIMEOUT=300

I then exited the shell and then logged back in. After no activity for
300 seconds (5 mins), I find that I am still logged in as root.

What am I doing wrong? Thanks in advance!

Cheers,

Rob S.

TMOUT has to be readonly:

readonly TMOUT=300
export TMOUT

Thank Jim. You were right on target!

All the best,

Rob