# Login time restriction

## LukynZ

By editing /etc/security/time.conf I should restrict user login/whatever only for times I want. However, this never works here. Maybe I do something wrong, maybe I need anything more? 

the line is:

```
*;*;xxx;Al1000-2100
```

That means user xxx can do anything on my system only from 10:00 to 21:00 every day....if I understand right. However I can login as xxx before and after this time restrict.

What is wrong here?

----------

## LukynZ

I see no one use this   :Sad: 

----------

## NeddySeagoon

LukynZ,

```

       services;ttys;users;times

...

       The first field, the services field, is a logic list of PAM service

       names that the rule applies to.
```

You need to be using pam for authentication, so services needs to be whatever the pam login service is called.

----------

## LukynZ

yes, but * means all services

----------

## py-ro

But you need to activate the pam_time modul in your PAM Service Files, it is not in there by default.

----------

