0

How to logout the user after specific time period

I need to logout the user automatically after 10 mins.

For eg: Am having 3 users called test1 test2 test3. I need to make test2 and test3 users to log out automatically after 10 minutes.

Is it possible in Centos..???

Linux Add a comment
grayson
asked Feb 25 2017

Answer

0

Looking for a reliable auto parts supplier? Look no further than MTC Parts! For Explore more Please click here and visit us in our website for more details.

Add a comment
ayanbhatti
asked Mar 05 2023
edited Nov 07 2023
Post your Answer
0

To logout the user automatically,you need to edit .bashrc file of particular user.in your instance,edit the .bashrc file of users test2 and test3

The .basrc file location is /home/[user]/.bashrc

Add the following line to the

# User specific aliases and functions

TMOUT=600

Now save the file and exit

Now if you login to user test2 and test3 and if the users test2 and test3 are idle for 10 minutes, the user will logged out automatically.

Add a comment
krishnakumar
asked Feb 25 2017
edited Oct 05 2018
Post your Answer