How to omit the password for Basic authentication (how to log in only user name)

Asked 1 years ago, Updated 1 years ago, 75 views

After setting it up in Apache's .htaccess as shown below,

AuthType Basic
AuthName "Only"
AuthUserFile/dirname/.htpasswd
Require valid-user

As shown below, the .htpasswd file omitted the password only for the username.

 test:

I'm having trouble logging in well for some reason.
I logged in successfully when I put my username and password in .htapasswd.

I searched a little bit about why I couldn't log in with just my username and Apache documentation, but I couldn't find it on the htaccess/authentication page.

I would appreciate it if you could let me know if anyone understands.
Thank you in advance.

apache .htaccess

2022-09-30 16:06

1 Answers

How about setting the password string in the htpasswd file to a hash value such as MD5 instead of plaintext?
htpasswd/dirname/.htpasswd test Press the return key without entering anything at the password input prompt.
Alternatively, htpasswd-b/dirname/.htpasswd test" in batch mode.


2022-09-30 16:06

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.