How to complete the "PAM Authentication" task

@Inderpreet
Thanks for the reply.

I’ve already been referring to the same link only. I’ve set the environment as mentioned but im not able to authenticate the website.

Can you give a tip on how the website url should be configured.

Is it http or https ?

http://localhost/protected
https://localhost/protected

Can you suggest on this?
Thanks,

Hello,

Website should work on http only since you are not asked to run it on https specifically.

Please try to check Apache logs to get some information what exactly happening behind the scenes, I am sure you will get some valuable information from there to troubleshoot the issue.

Thanks
Inderpreet

This question is really confusing if we didn’t read it carefully and ending up changing lot of stuff in Apache… we are missing logic here… Basic + PAM Authentication… it took a lot of time to understand but finally able to finish it… Read the question carefully…
Great one :+1: :upside_down_face:

@hprasanna hint for u: use /protected at end of LB url in your SS to check or from jump box try below
curl -u username>:password> http://<LB Url/protected/index.html
and it should work for only given user… for other users it should return 401 unauthorized error. All the best :slight_smile:

2 Likes

I’m not able to run command sudo systemctl start httpd keeps throwing this error Failed to get D-Bus connection: Operation not permitted. Has anyone ran into this issue? @Inderpreet @kodekloud-support3

@JDev

Why are you trying to start Apache on storage server, I think you need to start it on app servers instead.

Helpful hint & question is quite tricky @Inderpreet @kiran

This question was asked 23 days ago. I no longer remember the point of the task.
I will try again next time around.

Task: PAM Authentication for Apache.

@hprasanna @kiran @hasmukhrathod @Inderpreet @vijin.palazhi

as per this url: CentOS 7 : Apache httpd : Basic Auth+PAM : Server World

followed the steps until restarting httpd on app1 server. All went fine until this point.

when I am selecting port to view host1. I get below error message displayed.

what is it I am missing, any hint or place that I should look at, will help me.

Please comment. Thank you!

@swaroopcs88 protected directory supposed to be configured at URL /protected, did you try that?

@Inderpreet I am sorry, unable to understand the below requirement i.e. what action is required from me.

protected directory supposed to be configured at URL /protected, did you try that?

Hi there,

I am a pretty newbie and just was able to do a basic install of the Apache server. I never didnt encounter with a PAM in the real life.
Could someone help me out? Could you share the right solution with me, step by step? I have spent with this task several hours and do not know what to do.

Thanks a lot.

@OndrejH

Try CentOS 7 : Apache httpd : Basic Auth+PAM : Server World if it helps.

I have already tried that (also googled a lot) but didn’t help. Would be possible to share the right solution, step by step?

@Inderpreet @kodekloud-support3 @Ayman @mmumshad @kiran @andrzej @Krishna Can anyone please guide on task “PAM Authentication For Apache”. unable to understand the requirements in this task.

Followed the steps given in CentOS 6 - Apache httpd - Basic Auth + PAM : Server World and many other docs from google still its not successful.

Really it will be helpful if we get clear cut steps or clues to complete this task.

Thanks in advance for your help.

according to task install PAM configuration
write some config into PAM default config file
generate htpasswd
and check by curl -u user-name http://ip-addr:ip
hope you got it

Thanks for your reply @Tej-Singh-Rana.

“Generate htpasswd” - In the task its mentioned that “We dont want to use htpasswd file for authentication.” Please find the attached screenshot. Here is the confusion :slight_smile:

What is BASIC+PAM Authentication? is this .htaccess and PAM config?

CC: @mmumshad @Inderpreet

actually i replied according to PAM Authentication. Sorry, i don’t know your tasks was Basic Auth + PAM.

Hi @Inderpreet

I completed my task for PAM authentication on all three APP servers , but it is showed it was failed. Can you please help check why it failed.

Regards

Vikram

@vikki.saroha

Seems like you configured it to work on URL http://<website-url>:<apache_port> however in the question is was specifcally asked to run it on http://<website-url>:<apache_port>/protected URL.

Hi @kiran, @Inderpreet , @hprasanna , @Chudo
Since the question asks for Basic + PAM Authentication ,for the Basic Authentication part , do we need to also setup .htaccess file . If so what is the AuthUserFile to use since the question says to not use htpasswd file ?