• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

PAM - time.conf - not able to login via ssh anymore

Hi There

I am playing with my raspberry pi with raspian OS (wheezy). I have three local accounts: root, pi and gc.
I wanted to test PAM Module pam_time.so to restrict SSH access for user pi (time limits). The idea was to restrict pi to not allow ssh login avery day from 0913-0920 (for testing).

Now of course something went wrong and i am not able to login by ssh at all (not with user gc and not with user pi... root is blocked anyway by sshd_conf). The configuration in /etc/security/time.conf looks

ssh;*;pi;!0913-0920

What I can see is, that I made a mistake with the date: it should look like
ssh;*;pi;!Al0913-0920

So my question: How can I fix it? And would it be correct that way?

I do not understand why i am not able to login by ssh with user gc at all, as the rule is only for user pi??
0
rizzolini
Asked:
rizzolini
  • 2
1 Solution
 
remeshkCommented:
what is your configuration in /etc/pam.d/sshd  also please try the below.

sshd;*;pi;!Al0913-0920
0
 
rizzoliniAuthor Commented:
You are good.

The problem seems to be in /etc/pam.d/sshd
i have
session required pam_conf.so

it should be
account requried pam_conf.so
0
 
rizzoliniAuthor Commented:
wrong entry in

/etc/pam.d/sshd
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now