Results 1 to 3 of 3
  1. #1

    logout root user from inactive session

    Generraly, administrators will stay login 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 that, you must set the special variable named “TMOUT” to the time in seconds of no input before logout.

    Edit your profile file (vi /etc/profile) and add the following line somewhere after the line that read “HISTSIZE=” on this file:

    Code:
    TMOUT=7200
    The value we enter for the variable “TMOUT=” is in seconds and represents 2 hours (60 * 60 = 3600 * 2 = 7200 seconds). It is important to note that if you decide to put the above line in your /etc/profile file, then the automatic logout after two hours of inactivity will apply for all users on the system. So, instead, if your prefer to control which users will be automatically logged out and which ones are not, you can set this variable in their individual .bashrc file.

    After this parameter has been set on your system, you must logout and login again (as root) for the change to take effect.
    Strat with Linux || Optimize, Secure and increase performance of Apache || Already Started
    The visionary conceives the impossible, The missionary makes it possible. ...Gita.

  2. #2
    Senior Member
    Join Date
    Jul 2006
    Location
    IndiaMDM
    Posts
    365
    Hello,

    this is a good information.

    Well I would always that a good administrator is one who logs in as root in the server and after he finishes the job logs out.

    Thank you.

    Regards,
    HostechSupport
    24x7 Remote Services
    Linux/Windows Server Administration Server Management
    Get in touch: support@hostechsuppport.com

  3. #3
    Junior Member
    Join Date
    Jan 2007
    Location
    India
    Posts
    10
    Also you can also force a user to log out by issuing the command

    skill -9 pty(number)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.