linux poison RSS
linux poison Email

Limit users access to a time range

In the cases when you want to limit the access to a Linux operating system in a time range, you would like to use pam_time.so.

Take a look at /etc/security/time.conf

To limit for example ssh access from 23:00 PM and 08:00 AM.
sshd;*;*;!Al2300-0800

The format of the file is:
Service;ttys;users;time

the !Al means, anything except "All the days".

If you would like to permit people from 4 to 8 PM all the days, except root:
login;*;!root;!Al1600-2000

Further reading: man time.conf


0 comments:

Post a Comment

Related Posts with Thumbnails