Solved

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

Posted on 2014-12-17
3
160 Views
Last Modified: 2016-08-13
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
Comment
Question by:rizzolini
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
remeshk earned 500 total points
ID: 40504667
what is your configuration in /etc/pam.d/sshd  also please try the below.

sshd;*;pi;!Al0913-0920
0
 

Author Comment

by:rizzolini
ID: 40504676
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
 

Author Closing Comment

by:rizzolini
ID: 40504695
wrong entry in

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

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question