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

Alessandro
Alessandro used Ask the Experts™
on
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??
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
what is your configuration in /etc/pam.d/sshd  also please try the below.

sshd;*;pi;!Al0913-0920
AlessandroFachspezialist Systemlösungen und Services

Author

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
AlessandroFachspezialist Systemlösungen und Services

Author

Commented:
wrong entry in

/etc/pam.d/sshd

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial