Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-12-17
3
Medium Priority
?
192 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 1500 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

In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
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
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

926 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