Avatar of Alessandro
Alessandro
Flag for Switzerland asked on

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??
Linux DistributionsRaspberry Pi

Avatar of undefined
Last Comment
Alessandro

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
remeshk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Alessandro

ASKER
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
Alessandro

ASKER
wrong entry in

/etc/pam.d/sshd
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck