Skip to content
  • FOSS WORLD
    • NEWS
    • DISTROWATCH
  • HACKS & TRICKS
    • GENERAL
    • MASTER THE BASH
  • GNU/LINUX SYSADMIN
    • CONTAINERS
    • DESKTOP
    • GENERAL
    • NETWORKING
    • PACKAGE MANAGEMENT
    • SECURITY
    • STORAGE
  • PROGRAMMING IN GNU/LINUX
    • BASH SCRIPTING
    • LINUX KERNEL
    • NETWORK
Search
Close

Openforums

My Linux inspired journey

Tag: root

Set login time out for the root account in GNU/Linux

May 7, 2013November 15, 2013 Anoop C SLeave a comment

In GNU/Linux the root access is the basis for any system level alterations. Administrators stay on as ‘root’ or forget to logout after finishing their work and leave their terminals unattended.The answer to solve this problem is to make the bash shell automatically logout after not being used for a period of time. For this we use the special linux variable TMOUT to set the time.

1. Login as root
2. Switch to the root home directory (by default it will
be in the root home)
3. Run nano .bashrc
4. Add the line TMOUT=3600 after ‘HISTFILESIZE=…’
5. Save the file and exit.

Note : The time is given in seconds i.e, 3600 = 1 hour.

Posts navigation

Newer Posts

Recent Posts

  • Tracing “Curl error (6): getaddrinfo() thread failed to start” error with systemd seccomp filters December 15, 2021
  • Stepping in to the world of containers with Samba December 14, 2021
  • New socket_wrapper release with fd-passing support February 9, 2021

Enter your email address to follow this blog and receive notifications of new posts by email.

Tags

bash fedora file gnu/linux grub Linux Linux kernel Password root windows

Author


Free Software enthusiast and Open Source developer

About me

Samba Team
Fedora wiki

Chat with me

@anoopcs

  • IRC (libera.chat and oftc)
  • Matrix (matrix.org)

Archives

Follow me

Mastodon
GitLab
GitHub

Move On

First they ignore you, then they laugh at you, then they fight you, then you win

Communities

Samba
GlusterFS
Fedoraproject
CentOS
Website Powered by WordPress.com.
Back to top
  • Follow Following
    • Openforums
    • Already have a WordPress.com account? Log in now.
    • Openforums
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar