[SOLVED] New password

Talks about solar stuff
Post Reply
Walter62
Posts: 32
Joined: Thu Aug 29, 2013 11:40 am
Location: Italia
Contact:

[SOLVED] New password

Post by Walter62 » Sat Jun 07, 2014 7:36 pm

Hi,
what is the way for change the admin password?

Thanks for support
Last edited by Walter62 on Sun Jun 08, 2014 9:20 am, edited 1 time in total.

jeanmarc
Posts: 2022
Joined: Thu Aug 29, 2013 7:16 am

Re: New password

Post by jeanmarc » Sat Jun 07, 2014 8:00 pm

Hi Walter,
Simply remove or edit your 123solar/admin/.htpasswd.
If you remove, you may recreate one by going back into http://.../123solar/admin/

Walter62
Posts: 32
Joined: Thu Aug 29, 2013 11:40 am
Location: Italia
Contact:

Re: New password

Post by Walter62 » Sat Jun 07, 2014 9:20 pm

Hi Jean-Marc,
this was my first thought, but after delete the .htpasswd and I'm back into http://.../123solar/admin/ the browser (I have try Chrome and Firefox) answered "500 internal server error" and no file is created.
The same if I try to delete the text inside to .htpasswd, no text is put inside to the file.
I see which the .htaccess have owner, www-data:www-data, and the original file .htpasswd have, root:root, is correct?

jeanmarc
Posts: 2022
Joined: Thu Aug 29, 2013 7:16 am

Re: New password

Post by jeanmarc » Sun Jun 08, 2014 7:48 am

Well it depend of your webserver, if you run nginx you may quote this part in /etc/nginx/nginx.conf. Kind of same method apply for Apache.

Code: Select all

#			location  /123solar/admin {
#			  index index.php;
#			  auth_basic            "Restricted";
#			  auth_basic_user_file  .htpasswd;
#			}
Restart nginx: systemctl restart nginx.
Go back again into http://.../123solar/admin/ via the browser, it will recreate the htpasswd file.
Once it's done, restart again nginx.
(BTW: The permission is read for everyone as the file is created by www user.)

There is various ways to create htpasswd. You may also add several users, use the same htpasswd for other folder.
ciao

Walter62
Posts: 32
Joined: Thu Aug 29, 2013 11:40 am
Location: Italia
Contact:

[SOLVED] New password

Post by Walter62 » Sun Jun 08, 2014 9:19 am

The problem isn't apache.conf.
In Apache there is a utility to change the password the name is ...... htpasswd, simply.

For other people with similar issue, the command is:

Code: Select all

htpasswd -c /var/www/123solar/admin/.htpasswd admin
this requires a new password and prompts you to reinsert it for safety

Thanks and sorry for trouble

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests