Lab 36.1 - PAM module
I use Ubuntu and try to follow the steps described in the lab.
I unfortunately cannot make use of PAM.
I inserted the lines that were given
account required pam_tally2.so
into the /etc/pam.d/sshd file, but after three failed attempts I can login via SSH successfully. The command sudo pam_tally2 does not display anything neither.
Maybe I need to put the two lines in a proper place in the file (if the order does matter)?
Can anyone help me with that? Any advices?
Comments
-
On CentOS 7 it just works as described in the lab.
I think I solved it on Ubuntu. You might need to adapt the /etc/ssh/sshd_config file.
First of all you should activate PAM for SSH:UsePAM yes
Then you should make sure the following lines are as follows (I don't understand exactly why or what those lines do exactly, but it works that way):ChallengeResponseAuthentication yes PasswordAuthentication no
Once this is done simply follow the lab instructions and it should work as expected.0 -
Hi Elyas,
I'm glad that you were able to solve the issue. It's common to find some differences between distros, so be sure that you will find more within time.
You can find more information about PAM here:
http://www.linux-pam.org/Linux-PAM-html/Linux-PAM_SAG.html
Regards,
Luis.
0 -
It doesn't solve it here.
I'm using Ubuntu 14.04 and have the same problem.
I've added those lines, but nothing happens.
pam_tally2 doesn't report any login Failures (counter is always at 0).
UsePAM yes is already uncommented in /etc/ssh/sshd_config (very last line)
I also tried restarting ssh service - no help there.
I tried loggging in console (tty3 - i always use 1 and 2) - nothing.
Any ideas?
0 -
Hi, I'm going to do a test on Ubuntu 14.04 and I'll let you know what I found.
Regards,
Luis.
0 -
ubuntu 14.04, openssh-server, confirmed not working
editing options doesn't work
0 -
Hi
Hope you are well.
Do we have instruction updates on this. Need to resolve this for the labs.
Thanks
AJ
0 -
Hi,
I did the test on Ubuntu 14.04 and in fact it didn't work. I'll see if I can troubleshoot it. And as reported, pam_tally2 doesn't report any login issues.
Regards,
Luis.
0 -
Hi,
I got it to work with the following _in the begining of the configuration file_ :
auth required pam_tally2.so deny=3 onerr=fail
@include common-auth
account required pam_tally2.so
[...]
Regards,
Luis.
0 -
While pam_tally2 -u username reports the failed logins, it doesn't actually lock the account for me. Are you sure the configuration you used locks the account after 3 failed attempts?
Thanks
Harry
0 -
The above setting will report correctly the failed logins. However, it doesn't really lock the account. Are there any other files to be edited in addition to the sshd file?
Thanks.
Harry
0 -
Hi,
Yes, it locked the account for me. In fact I was unable to connect by ssh and I received an error message.
Regards,
Luis.
0
Categories
- All Categories
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 1.4K LFS258 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 945 Programming and Development
- 310 Kernel Development
- 617 Software Development
- 977 Software
- 369 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)