apache basic authenticaionPermission issues while setting up cakephpRunning two instances of Apache as separate users — permission denieddifference between Apache installationsWhy does httpd give an error following a symlink into my home directory on Fedora?postgresql auth against samba active directoryApache group authorization with mod_lookup_identityCGI with Shell ScriptDebian SFTP WinSCP “Authentication failed.” User in Group can't establish SFTP connectionApache2.4 on Centos - allow specific IPs to skip authentication - not workingWhat am I missing in PAM configuration for Redhat Apache?

I am the light that shines in the dark

Can I challenge the interviewer to give me a proper technical feedback?

PTIJ: Sport in the Torah

Why does this boat have a landing pad? (SpaceX's GO Searcher) Any plans for propulsive capsule landings?

Is this Paypal Github SDK reference really a dangerous site?

What exactly is the meaning of "fine wine"?

Is it appropriate to ask a former professor to order a library book for me through ILL?

I am the person who abides by rules but breaks the rules . Who am I

What is the purpose of a disclaimer like "this is not legal advice"?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

Can multiple states demand income tax from an LLC?

What is 'Log Memory' in Query Store 2017

Professor forcing me to attend a conference, I can't afford even with 50% funding

How to distinguish easily different soldier of ww2?

An Undercover Army

Averaging over columns while ignoring zero entries

Does the US political system, in principle, allow for a no-party system?

std::string vs const std::string& vs std::string_view

Where is the License file location for Identity Server in Sitecore 9.1?

Why restrict private health insurance?

School performs periodic password audits. Is my password compromised?

Boss Telling direct supervisor I snitched

Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?

Tabular environment - text vertically positions itself by bottom of tikz picture in adjacent cell



apache basic authenticaion


Permission issues while setting up cakephpRunning two instances of Apache as separate users — permission denieddifference between Apache installationsWhy does httpd give an error following a symlink into my home directory on Fedora?postgresql auth against samba active directoryApache group authorization with mod_lookup_identityCGI with Shell ScriptDebian SFTP WinSCP “Authentication failed.” User in Group can't establish SFTP connectionApache2.4 on Centos - allow specific IPs to skip authentication - not workingWhat am I missing in PAM configuration for Redhat Apache?













0















I have enabled basic authentication for one of the directories on website.
The code has been added in the httpd.conf file.
The user and passwords have been added in the /etc/passwd file. The same path has been entered in the httpd.conf.
Checked that all the modules i.e. basic, auth, rewrite etc are being loaded in apache.



Problem - once I try and access the folder on the website (internet) the authentication popup comes up, however when I fill in the username and password it does not proceed further and keeps showing the popup again and again, without access to the directory.



code of httpd.conf



<Directory "/srv/www/htdocs/.....">
AllowOverride AuthConfig
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/etc/passwd"
# AuthGroupFile "/etc/group"
Require valid-user
</Directory>









share|improve this question



















  • 1





    why did you set the AuthUserFile as "/etc/passwd" ? this file is already used for other purposes : containing essential informations about system's accounts

    – lese
    Nov 26 '15 at 14:28















0















I have enabled basic authentication for one of the directories on website.
The code has been added in the httpd.conf file.
The user and passwords have been added in the /etc/passwd file. The same path has been entered in the httpd.conf.
Checked that all the modules i.e. basic, auth, rewrite etc are being loaded in apache.



Problem - once I try and access the folder on the website (internet) the authentication popup comes up, however when I fill in the username and password it does not proceed further and keeps showing the popup again and again, without access to the directory.



code of httpd.conf



<Directory "/srv/www/htdocs/.....">
AllowOverride AuthConfig
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/etc/passwd"
# AuthGroupFile "/etc/group"
Require valid-user
</Directory>









share|improve this question



















  • 1





    why did you set the AuthUserFile as "/etc/passwd" ? this file is already used for other purposes : containing essential informations about system's accounts

    – lese
    Nov 26 '15 at 14:28













0












0








0








I have enabled basic authentication for one of the directories on website.
The code has been added in the httpd.conf file.
The user and passwords have been added in the /etc/passwd file. The same path has been entered in the httpd.conf.
Checked that all the modules i.e. basic, auth, rewrite etc are being loaded in apache.



Problem - once I try and access the folder on the website (internet) the authentication popup comes up, however when I fill in the username and password it does not proceed further and keeps showing the popup again and again, without access to the directory.



code of httpd.conf



<Directory "/srv/www/htdocs/.....">
AllowOverride AuthConfig
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/etc/passwd"
# AuthGroupFile "/etc/group"
Require valid-user
</Directory>









share|improve this question
















I have enabled basic authentication for one of the directories on website.
The code has been added in the httpd.conf file.
The user and passwords have been added in the /etc/passwd file. The same path has been entered in the httpd.conf.
Checked that all the modules i.e. basic, auth, rewrite etc are being loaded in apache.



Problem - once I try and access the folder on the website (internet) the authentication popup comes up, however when I fill in the username and password it does not proceed further and keeps showing the popup again and again, without access to the directory.



code of httpd.conf



<Directory "/srv/www/htdocs/.....">
AllowOverride AuthConfig
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/etc/passwd"
# AuthGroupFile "/etc/group"
Require valid-user
</Directory>






apache-httpd authentication






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 hours ago









Rui F Ribeiro

41.2k1481140




41.2k1481140










asked Nov 26 '15 at 13:30









Prop ChillProp Chill

1




1







  • 1





    why did you set the AuthUserFile as "/etc/passwd" ? this file is already used for other purposes : containing essential informations about system's accounts

    – lese
    Nov 26 '15 at 14:28












  • 1





    why did you set the AuthUserFile as "/etc/passwd" ? this file is already used for other purposes : containing essential informations about system's accounts

    – lese
    Nov 26 '15 at 14:28







1




1





why did you set the AuthUserFile as "/etc/passwd" ? this file is already used for other purposes : containing essential informations about system's accounts

– lese
Nov 26 '15 at 14:28





why did you set the AuthUserFile as "/etc/passwd" ? this file is already used for other purposes : containing essential informations about system's accounts

– lese
Nov 26 '15 at 14:28










2 Answers
2






active

oldest

votes


















1














I'm pretty sure you don't want to use /etc/passwd and /etc/group in the AuthUserFile and AuthGroupFile directives.



I believe you need to create separate files (with the AuthUserFile file created and maintained using the htpasswd command).



If you want to have Apache authenticate using your normal system accounts, then you need to look at an authentication module that uses something like PAM (I found this but I have no idea if it is any good - I've never used it).






share|improve this answer


















  • 1





    All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

    – Rui F Ribeiro
    Nov 26 '15 at 14:24



















0














As Murray suggested you could create an other file ( that is not /etc/passwd ), and then as described here, you can proceed as follow in order to create Basic Authentication users :



htpasswd -c /path/to/your/file username


this will prompt you to enter a password that will be encrypt and saved into the file defined above. Note that if you want to create an other user (more than one) you need to remember to omit the -c parameter :



htpasswd /path/to/your/file username


Otherwise your file will be re-created, and you will overwrite the previous added user(s)



htpasswd --help



-c Create a new file.




additionally, consider that you can decide what encryption algorithm to use for password encryption:




-m Force MD5 encryption of the password.



-d Force CRYPT encryption of the password (default).



-p Do not encrypt the password (plaintext).



-s Force SHA encryption of the password.







share|improve this answer

























  • thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

    – Prop Chill
    Nov 27 '15 at 10:51











  • using suse enterprise server 11 sp3

    – Prop Chill
    Nov 27 '15 at 10:56











  • thanx a ton found it it is usr/bin as htpasswd2

    – Prop Chill
    Nov 27 '15 at 11:02











  • good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

    – lese
    Nov 27 '15 at 11:08










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f245668%2fapache-basic-authenticaion%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I'm pretty sure you don't want to use /etc/passwd and /etc/group in the AuthUserFile and AuthGroupFile directives.



I believe you need to create separate files (with the AuthUserFile file created and maintained using the htpasswd command).



If you want to have Apache authenticate using your normal system accounts, then you need to look at an authentication module that uses something like PAM (I found this but I have no idea if it is any good - I've never used it).






share|improve this answer


















  • 1





    All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

    – Rui F Ribeiro
    Nov 26 '15 at 14:24
















1














I'm pretty sure you don't want to use /etc/passwd and /etc/group in the AuthUserFile and AuthGroupFile directives.



I believe you need to create separate files (with the AuthUserFile file created and maintained using the htpasswd command).



If you want to have Apache authenticate using your normal system accounts, then you need to look at an authentication module that uses something like PAM (I found this but I have no idea if it is any good - I've never used it).






share|improve this answer


















  • 1





    All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

    – Rui F Ribeiro
    Nov 26 '15 at 14:24














1












1








1







I'm pretty sure you don't want to use /etc/passwd and /etc/group in the AuthUserFile and AuthGroupFile directives.



I believe you need to create separate files (with the AuthUserFile file created and maintained using the htpasswd command).



If you want to have Apache authenticate using your normal system accounts, then you need to look at an authentication module that uses something like PAM (I found this but I have no idea if it is any good - I've never used it).






share|improve this answer













I'm pretty sure you don't want to use /etc/passwd and /etc/group in the AuthUserFile and AuthGroupFile directives.



I believe you need to create separate files (with the AuthUserFile file created and maintained using the htpasswd command).



If you want to have Apache authenticate using your normal system accounts, then you need to look at an authentication module that uses something like PAM (I found this but I have no idea if it is any good - I've never used it).







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 26 '15 at 14:23









Murray JensenMurray Jensen

1,314165




1,314165







  • 1





    All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

    – Rui F Ribeiro
    Nov 26 '15 at 14:24













  • 1





    All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

    – Rui F Ribeiro
    Nov 26 '15 at 14:24








1




1





All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

– Rui F Ribeiro
Nov 26 '15 at 14:24






All in all it is not a good idea to add normal Unix user accounts expressly for web pages authentication.

– Rui F Ribeiro
Nov 26 '15 at 14:24














0














As Murray suggested you could create an other file ( that is not /etc/passwd ), and then as described here, you can proceed as follow in order to create Basic Authentication users :



htpasswd -c /path/to/your/file username


this will prompt you to enter a password that will be encrypt and saved into the file defined above. Note that if you want to create an other user (more than one) you need to remember to omit the -c parameter :



htpasswd /path/to/your/file username


Otherwise your file will be re-created, and you will overwrite the previous added user(s)



htpasswd --help



-c Create a new file.




additionally, consider that you can decide what encryption algorithm to use for password encryption:




-m Force MD5 encryption of the password.



-d Force CRYPT encryption of the password (default).



-p Do not encrypt the password (plaintext).



-s Force SHA encryption of the password.







share|improve this answer

























  • thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

    – Prop Chill
    Nov 27 '15 at 10:51











  • using suse enterprise server 11 sp3

    – Prop Chill
    Nov 27 '15 at 10:56











  • thanx a ton found it it is usr/bin as htpasswd2

    – Prop Chill
    Nov 27 '15 at 11:02











  • good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

    – lese
    Nov 27 '15 at 11:08















0














As Murray suggested you could create an other file ( that is not /etc/passwd ), and then as described here, you can proceed as follow in order to create Basic Authentication users :



htpasswd -c /path/to/your/file username


this will prompt you to enter a password that will be encrypt and saved into the file defined above. Note that if you want to create an other user (more than one) you need to remember to omit the -c parameter :



htpasswd /path/to/your/file username


Otherwise your file will be re-created, and you will overwrite the previous added user(s)



htpasswd --help



-c Create a new file.




additionally, consider that you can decide what encryption algorithm to use for password encryption:




-m Force MD5 encryption of the password.



-d Force CRYPT encryption of the password (default).



-p Do not encrypt the password (plaintext).



-s Force SHA encryption of the password.







share|improve this answer

























  • thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

    – Prop Chill
    Nov 27 '15 at 10:51











  • using suse enterprise server 11 sp3

    – Prop Chill
    Nov 27 '15 at 10:56











  • thanx a ton found it it is usr/bin as htpasswd2

    – Prop Chill
    Nov 27 '15 at 11:02











  • good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

    – lese
    Nov 27 '15 at 11:08













0












0








0







As Murray suggested you could create an other file ( that is not /etc/passwd ), and then as described here, you can proceed as follow in order to create Basic Authentication users :



htpasswd -c /path/to/your/file username


this will prompt you to enter a password that will be encrypt and saved into the file defined above. Note that if you want to create an other user (more than one) you need to remember to omit the -c parameter :



htpasswd /path/to/your/file username


Otherwise your file will be re-created, and you will overwrite the previous added user(s)



htpasswd --help



-c Create a new file.




additionally, consider that you can decide what encryption algorithm to use for password encryption:




-m Force MD5 encryption of the password.



-d Force CRYPT encryption of the password (default).



-p Do not encrypt the password (plaintext).



-s Force SHA encryption of the password.







share|improve this answer















As Murray suggested you could create an other file ( that is not /etc/passwd ), and then as described here, you can proceed as follow in order to create Basic Authentication users :



htpasswd -c /path/to/your/file username


this will prompt you to enter a password that will be encrypt and saved into the file defined above. Note that if you want to create an other user (more than one) you need to remember to omit the -c parameter :



htpasswd /path/to/your/file username


Otherwise your file will be re-created, and you will overwrite the previous added user(s)



htpasswd --help



-c Create a new file.




additionally, consider that you can decide what encryption algorithm to use for password encryption:




-m Force MD5 encryption of the password.



-d Force CRYPT encryption of the password (default).



-p Do not encrypt the password (plaintext).



-s Force SHA encryption of the password.








share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 27 '15 at 22:59

























answered Nov 26 '15 at 14:48









leselese

2,13331327




2,13331327












  • thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

    – Prop Chill
    Nov 27 '15 at 10:51











  • using suse enterprise server 11 sp3

    – Prop Chill
    Nov 27 '15 at 10:56











  • thanx a ton found it it is usr/bin as htpasswd2

    – Prop Chill
    Nov 27 '15 at 11:02











  • good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

    – lese
    Nov 27 '15 at 11:08

















  • thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

    – Prop Chill
    Nov 27 '15 at 10:51











  • using suse enterprise server 11 sp3

    – Prop Chill
    Nov 27 '15 at 10:56











  • thanx a ton found it it is usr/bin as htpasswd2

    – Prop Chill
    Nov 27 '15 at 11:02











  • good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

    – lese
    Nov 27 '15 at 11:08
















thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

– Prop Chill
Nov 27 '15 at 10:51





thanx plz, I am using apache ver 2.2.12 and the command htpasswd does not work. I have been using useradd and passwd commands is that ok?

– Prop Chill
Nov 27 '15 at 10:51













using suse enterprise server 11 sp3

– Prop Chill
Nov 27 '15 at 10:56





using suse enterprise server 11 sp3

– Prop Chill
Nov 27 '15 at 10:56













thanx a ton found it it is usr/bin as htpasswd2

– Prop Chill
Nov 27 '15 at 11:02





thanx a ton found it it is usr/bin as htpasswd2

– Prop Chill
Nov 27 '15 at 11:02













good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

– lese
Nov 27 '15 at 11:08





good, I'm glad of that, remember to accept an answer if there is one that resolved you issue. And in case vote

– lese
Nov 27 '15 at 11:08

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f245668%2fapache-basic-authenticaion%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mobil Contents History Mobil brands Former Mobil brands Lukoil transaction Mobil UK Mobil Australia Mobil New Zealand Mobil Greece Mobil in Japan Mobil in Canada Mobil Egypt See also References External links Navigation menuwww.mobil.com"Mobil Corporation"the original"Our Houston campus""Business & Finance: Socony-Vacuum Corp.""Popular Mechanics""Lubrite Technologies""Exxon Mobil campus 'clearly happening'""Toledo Blade - Google News Archive Search""The Lion and the Moose - How 2 Executives Pulled off the Biggest Merger Ever""ExxonMobil Press Release""Lubricants""Archived copy"the original"Mobil 1™ and Mobil Super™ motor oil and synthetic motor oil - Mobil™ Motor Oils""Mobil Delvac""Mobil Industrial website""The State of Competition in Gasoline Marketing: The Effects of Refiner Operations at Retail""Mobil Travel Guide to become Forbes Travel Guide""Hotel Rankings: Forbes Merges with Mobil"the original"Jamieson oil industry history""Mobil news""Caltex pumps for control""Watchdog blocks Caltex bid""Exxon Mobil sells service station network""Mobil Oil New Zealand Limited is New Zealand's oldest oil company, with predecessor companies having first established a presence in the country in 1896""ExxonMobil subsidiaries have a business history in New Zealand stretching back more than 120 years. We are involved in petroleum refining and distribution and the marketing of fuels, lubricants and chemical products""Archived copy"the original"Exxon Mobil to Sell Its Japanese Arm for $3.9 Billion""Gas station merger will end Esso and Mobil's long run in Japan""Esso moves to affiliate itself with PC Optimum, no longer Aeroplan, in loyalty point switch""Mobil brand of gas stations to launch in Canada after deal for 213 Loblaws-owned locations""Mobil Nears Completion of Rebranding 200 Loblaw Gas Stations""Learn about ExxonMobil's operations in Egypt""Petrol and Diesel Service Stations in Egypt - Mobil"Official websiteExxon Mobil corporate websiteMobil Industrial official websiteeeeeeeeDA04275022275790-40000 0001 0860 5061n82045453134887257134887257

Frič See also Navigation menuinternal link

Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant