• Home
  • About Us
  • Privacy Policy
Tobby News
  • How To:
  • Linux
  • Programming
    • AJAX
    • Android
    • HTML, CSS
    • Javascript
    • jQuery
    • php
  • Blogging
    • Internet Marketing
    • SEO
  • Wordpress
  • Social Media
  • General
  • Joomla
  • Photoshop
  • Windows
0


How To: Configure LINUX – User Can Login in Specified Days Only

Dated: 25/01/2012   Author:prasad Linux

  • Tweet
  • Share
  • Email
  • CevherShare
  • Tweet
  • Share
  • Email

 

In Redhat Linux operating system we can configure our system that can allow users to login in the system in some specified days of the week with Pluggable Authentication Module (PAM).

#cd /etc/pam.d

#vim login

account required pam_nologin.so

account required pam_time.so

:wq!

By   account required pam_time.so   placing this line in login file, while login it will invoke this time.conf file. In time.conf file we can configure the login permission for root.

 

#vim /etc/security/time.conf

 

root can login into the system only on tuesday at 10 A.M to 7 P.M

last line     login;tty*;root;Tu1000-1900

 

student(guest user/ client) can login into the system only on tuesday at 10 A.M to 7 P.M

last line     login;tty*;student;Tu1000-1900    (for users)

 

root can login into the system only on tuesday at 10 A.M to 7 P.M in terminal 1 (TTY1) only

last line     login;tt1;root;Tu1000-1900

 

root can’t login into system except tuesday, i.e.,on tuesday between 10 A.M – 7 P.M root can login into system. This will be applicable for all terminals

last line     login;tty*;root;!Tu1000-1900

 

root can able to login into the system on monday, tuesday and wednesday between 10 A.M – 7 P.M.

last line     login;tty*;root;MoTuWe1000-1900

 

root can login into the system all days except Monday. i.e, on Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday root can login through any terminal

last line     login;tty*;root;AlMo1000-1900

 

AlMo  <<=>>  !Mo

 

Values for days

Mo – Monday

Tu – Tuesday

We – Wednesday

Th – Thursday

Fr – Friday

Sa – Saturday

Su- Sunday

Wk – Weekend

Wd – Weekdays

Al – All Except

 

 

 

prasad

About prasad

Prasad K has written 111 post in this blog.

  • View all posts by prasad →
  • Blog
  • Google+

Related posts:

  1. SSH(Secure SHell) in REDHAT
  2. Pluggable Authentication mode (PAM) RHEL 5
  3. Block/Restrict SSH Login with TCP Wrapper
  4. How To Configure NFS(Network File System) Server in LINUX Redhat
  5. How To : Allow Root, Users To Login Only Through Specified Terminals With PAM
Linux, PAM login in specified days with specified terminals
Cancel Reply

        


Follow @Recruitrider

  • Popular Posts

    • User Registration form in PHP and MySQL
    • Warning: Missing required field entry title | Missing required field updated | Missing required hCard author
    • Submitting Form without Using Submit button in JavaScript
    • How To: Insert Data into MySQL Database Using Drop Down Box in PHP
    • what is difference between mysql_fetch_array(), mysql_fetch_row(), mysql_fetch_assoc() and mysql_fetch_object() in php
    • PHP Code to Get IP address of Website Visitor
    • Javascript Alert Box in PHP
    • Difference Between Client Side and Server Side Language
    • How To: Insert Data into Database using Check Box in PHP
    • Proxy Server Configuration to Block Website Access in Redhat
  • Recent Posts

    • Sending E-Mail with PHP

      PHP  is a  powerful tool to develop a dynamic site. E-mail is also included in the PHP. Codes to sending e-mail is not a complex or Read More »
    • joomla administration page

      How To:Install Joomla

      Joomla is very powerful Content management System. Day to Day Joomla is gaining Developers for the Website Development. There are Many more Cool Features in the Read More »
    • tobby-news1

      How To:Create a GIF Image With Photoshop

      GIF is the Graphical Interchange Format. Gif is an image but there will be an animation or some moving objects in the Image. The GIF files Read More »
    • disk properties window

      How to: Lock A Drive or Folder in Windows 7 and XP

      Security is an essential thing for the computer, most of the Data in the computer will be personal to the User. So, some data stored in Read More »
    • Logon-screen1

      How to: Create A Single Page Website with HTML

      In The Website Designing there are many more page designing methods. The Single page site designing is also a attractive and it looks awesome. This is Read More »
    • Code Behind part to setup a Enquiry form in a ASP.Net Website

      To Setup a Enquiry form in a ASP.Net Website Add this Namespaces in your Codebehind file: using System.Net.Mail; using System.Net; Desription: The System.Net.Mail namespace contains classes Read More »
    • Gmail Compose Message New Interface

      Gmail compose message new interface looks awesome when compared to old one. Google has introduced a new interface in gmail’s compose message. In older version of gmail’s Read More »
    • Google Earth For Linux RedHat 4.0 to 5.4

        Google Earth is a software interface for the Google maps. t is an Extreme application for the Google maps. Thus the Google maps is available for the UNIX Read More »
  • Blogger Badge

    IndiBlogger - The Largest Indian Blogger Community
  • Search

© 2013 Tobby News
Powered by WordPress | Designed by: Online Remote Desktop | Thanks to Hosted Exchange 2010, Web based Project Management and What is SharePoint?