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?
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
add a comment |
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
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
add a comment |
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
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
apache-httpd authentication
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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).
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
add a comment |
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.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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).
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
add a comment |
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).
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
add a comment |
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).
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).
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
add a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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