Configure the shell to logout automatically after a period of idle time.

ในบางระบบที่มีการให้ user login เข้าสู่ระบบเยอะมากและมี user ที่ออกจากระบบโดยไม่มีการ logout ออกไปจะทำให้ระบบสูญเสียทรัพยากรโดยใช้เหตุ ดังนั้นเราสามารถที่จะนำวิธีนี้มาแก้ไขได้และยังเพื่อความปลอดภัยให้กับระบบอีกทางนึงด้วย วิธีการจะแตกต่างกันขึ้นอยู่กับ shell ที่ใช้ซึ่งสามารถดูวิธีการเว็ตของแต่ละ shell ได้ดังวิธีข้างล่าง

สำหรับ bash or zsh:
#export TMOUT=เวลา หน่อยเป็นวินาที

สำหรับ tcsh:
#set autologout=เวลา หน่อยเป็นวินาที

สำหรับ ksh:
#export TMOUT=เวลา หน่อยเป็นวินาที

Related posts:

  1. Disable the auto complete feature of the BASH shell ข้อดีของ bash shell อีกข้อหนึ่งคือ feature auto complete ซึ่งจะทำให้เราไม่ต้องพิมพ์ตัวอักษรทั้งหมด...
  2. Logout the user from ssh after 15 minutes of inactivity เพื่อความปลอดภัยจากการใช้งาน ssh เราสามารถตั้งค่าให้ระบบ logout user ที่ไม่ได้ใช้งานหลังจาก 15 นาทีผ่านไปแล้ว...
  3. Lock user after a set number of login attempts but also automatically unlock after 5 minutes หากต้องการให้ระบบทำการ lock user ที่จะพยายามเข้าสู่ระบบเกินกว่าจำนวนครั้งที่เรากำหนด แต่ไม่รู้จะสามารถทำได้อย่างไร ในบทความนี้มีคำตอบให้กับปัญหานี้ครับ ใน Pluggable...
  4. How to set a crontab to run command on the last day of every month. เป็นที่ทราบกันดีว่าใน crontab ของ linux มีแค่การกำหนด เวลา วัน เดือน...
  5. How to install Dell OpenManage Server Administrator (OMSA) Dell OpenManage Server Administrator (OMSA) เป็น software ที่สำคัญสำหรับผู้ที่ใช้เครื่อง...

Both comments and pings are currently closed.

Comments are closed.