Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I enable password reset ? #2247

Closed
freedomtrain opened this issue Aug 2, 2017 · 19 comments
Closed

How do I enable password reset ? #2247

freedomtrain opened this issue Aug 2, 2017 · 19 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@freedomtrain
Copy link

How do I enable password reset ?

Thanks

@lunny
Copy link
Member

lunny commented Aug 3, 2017

Password reset is enabled default.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Aug 3, 2017
@captn3m0
Copy link

You can reset password using the command line as well: gitea admin change-password --username username --password PASSWORD

@pinpox
Copy link

pinpox commented Jul 6, 2018

@lunny It is not on the installation with Arch linux's AUR. At least I get an error saying it is disabled.
The command gitea admin change-password --username username --password PASSWORD returns an error:

models.SetEngine: Failed to connect to database: Unknown database type: 

@lunny
Copy link
Member

lunny commented Jul 8, 2018

you could use --config to indicate where is your app.ini

@Poikilos
Copy link

Poikilos commented Jun 5, 2019

@techknowlogick Why was this closed without an answer? There is no obvious setting in the sample app.ini: https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample

The comments above do not answer the question. The OP did not ask how to reset a password using the command line interface, nor whether enabling password reset was default, but how to turn on the password reset feature. I am on a gitea repo now and the admin does not know how to turn on password reset (so it clearly isn't on by default--he doesn't know how to change it). If I click reset password, it says:

Forgot Password
Password reset is disabled. Please contact your site administrator.

@dipyalov
Copy link

I support @Poikilos. Why is this a closed issue? I'm facing the same problem with no clue which config option to change.

@alexanderadam
Copy link

alexanderadam commented Jul 19, 2019

I'm not a maintainer but this string isn't even in the source code.

@dipyalov are you sure that you are using the latest version, because there was also this PR that was merged in April.

Why was this closed without an answer?

Did his suggestion (gitea admin change-password --username username --password PASSWORD --config CONFIG_PATH) not work?

@jolheiser
Copy link
Member

jolheiser commented Jul 19, 2019

@Poikilos @dipyalov Password reset is only considered enabled when a mail service is set up, as that's how Gitea currently sends the account recovery.

If no mail service is set up, I believe the CLI is the only other way to do it, or have your admin change it for you and then you change it again after regaining access.
It's not ideal, but I think perhaps a nice future feature would be to then allow admins to force users to change their password, similar to how the CLI does.

@Poikilos
Copy link

Poikilos commented Jul 20, 2019

I was referring to Gitea Version: 1.8.1 (Go1.12.5). I'll tell him that lack of mail config may be the issue. Shouldn't the admin interface give some kind of warning (to configure mail) where the setting would be, instead of just hiding password reset the setting?

@Poikilos
Copy link

Poikilos commented Jul 20, 2019

Did his suggestion (gitea admin change-password --username username --password PASSWORD --config CONFIG_PATH) not work?

@alexanderadam The whole point of this topic is that end users cannot reset their passwords. Again, this topic is not discussing manual intervention by admins.

@alexanderadam
Copy link

The whole point of this topic is that end users cannot reset their passwords.

Okay, then I probably misread binaryplease writing that he tested the admin command it without --config and got an error. 😉

this topic is not discussing manual intervention by admins

IMHO it isn't possible to do this on a misconfigured system.
Because you can't add the email configuration without being an admin and you can't execute the gitea command.

So either the admin adds the email configuration like described in the config cheat sheet or he uses the command captn3m0 wrote about.

Or, to make this clear: the whole point should is, that asking your admin should be the first step if you are an end user and you encounter some problems on a particular installation (which is not only true for gitea).

@Poikilos
Copy link

Poikilos commented Jul 21, 2019

@alexanderadam

Okay, then I probably misread binaryplease writing that he tested the admin command it without --config and got an error. 😉

He's not the OP, and the command isn't something "disabled" (just malfunctioning in the case of one reply, which is off topic or a workaround at best). There is no need to be snarky. The issue is clear, and I've not misunderstood it, unless you or the OP can point to where there is a setting that disables the CLI workaround.

So either the admin adds the email configuration like described in the config cheat sheet or he uses the command captn3m0 wrote about.
Or, to make this clear: the whole point should is, that asking your admin should be the first step if you are an end user and you encounter some problems on a particular installation (which is not only true for gitea).

The OP could be an admin, and the admin on my instance doesn't know how to enable it. I'll ask again: Shouldn't the admin interface give some kind of warning (to configure mail) where the setting would be, instead of just hiding the password reset setting (or is it just hidden from users, also without a warning to admins)?

@jolheiser
Copy link
Member

@Poikilos There is no setting for password resets. It is considered "enabled" when a mail service is configured, and "disabled" otherwise, as far as I can tell.

Perhaps a better error message could be given, at least to admins?
Password reset is disabled. Please contact your site administrator. seems reasonable to give to a user, since they don't need to know the inner workings.
However, perhaps an admin should be given more context, such as Please set up a mailing configuration to enable Password Reset or something similar?

@VitaliyAT
Copy link

When I try realize gitea admin change-password --username username --password PASSWORD
For me it's:
root@TestLab:/usr/local/gitea/gitea# ./gitea admin change-password --username gitea --password gitea --config ./conf/app.ini
I'v got this:
2019/08/28 22:14:26 ...s/setting/setting.go:831:NewContext() [F] Expect user 'gitea' but current user is: root

Try install and use Gitea on DSM Synology. First time it was OK - I'v got admin access, but after relogin "Wrong login or password". I already uninstall Gitea and reinstall it again - no luck, apologize all in data base.

It's looped problem. I need change password because it write me that it's wrong, but I can't change it because I need this password for change.

How can I reset all Gitea in my situation? I just in the beginning of it and can do it but don't know exactly how.

@jolheiser
Copy link
Member

jolheiser commented Aug 28, 2019

root@TestLab:/usr/local/gitea/gitea# ./gitea admin change-password --username gitea --password gitea --config ./conf/app.ini

This command would be to change the Gitea user named gitea

2019/08/28 22:14:26 ...s/setting/setting.go:831:NewContext() [F] Expect user 'gitea' but current user is: root

This error is telling you that it is expecting you to run the command as the gitea system account rather than root.

For further help, would you mind opening a new issue so as not to add on to this closed one? 😃

@Poikilos
Copy link

Poikilos commented Aug 28, 2019

@VitaliyAT Please read the detailed posts above clarifying that "How do I enable password reset" (for end users) is not the same as "How do I reset a password" (as admin). Consider deleting your comment and posting it in a new issue as jolheiser suggested instead, so that your comment does not further muddy this issue nor bury jolhheiser's proposed solution to this issue.

@gewure
Copy link

gewure commented Nov 8, 2019

honestly, this issue and the way of communication here bugs me.

many reasons:
#1 why close this twice, when its not resolved, as a question?!
#2 "further muddy this issue". nono, its not the users who are to blame here. Show some respect for people trying to advance documentation of gitea and solve problems they have.
#3 generally: the very most people writing github issues try to solve a problem they already tried solving hard before. most people don't even write an issue then. Its maybe 1-5% of users who write at all --- and being greeted with "don't write!!" adds to the general mood of not asking. Which then results in more question, because none gives a **** about resolving the issues, as meant by the author (who, in most cases is no expert on the matter - because of lack of meaningful documentation).

Also "is enabled by default" is simply not true as an answer, because a working mailserver-conf is a requirement and that is by default not enabled.

@Poikilos "this topic is not discussing manual intervention by admins." well then, to be honest: it should do so!!

Sorry to comment on a closed one, but .. not that much sorry. Just had the same problem, read the whole issue, am now not really any more informed, other than i got the impression one shouldn't ask questions/write issues ...and (funnily enough) even if someone understands what the real question is ("how to manually change password as admin"), there is NO answer to it ':D

like.. why bother with writing answers, if there is no verbose information in it? Not worth the typing.

whatever. Just my 2 Cents & impression, being a little frustrated. take it as feedback to improve.

@jolheiser
Copy link
Member

jolheiser commented Nov 8, 2019

For anyone who finds this issue, I would like to make another comment here at the bottom to address the aggregation of scenarios in this thread.

How can I enable password reset / How can a user's password be changed?

The original question

How can I enable password reset (for end users)?

There is no setting for password resets. It is considered "enabled" when a mail service is configured, and "disabled" otherwise.


How can a user's password be changed?

  • As an admin, you can change any user's password (and optionally force them to change it on next login)...
    • By navigating to your Site Administration -> User Accounts page and editing a user.
    • By using the CLI.
      Keep in mind most commands will also need a global flag to point the CLI at the correct configuration.
  • As a user you can change it...
    • In your account Settings -> Account page (this method requires you to know your password.) Maybe not entirely relevant to this thread, but posted here for completeness.
    • By using the Forgot Password link, assuming there is a configured mail service.

@Poikilos
Copy link

Poikilos commented Nov 9, 2019

@gewure,

  1. A different question was asked than the original issue. Posting separate issues will not help the issue get resolved. I'm not a maintainer and I'm not trying to be unwelcoming. I'm a user trying to get my problem solved. I didn't say for @VitaliyAT not to ask questions, I said post a separate issue, so both problems can get addressed instead of none.

  2. The maintainers posting how to change the password from the command line then closing the issue is a misunderstanding of the issue or need for GUI solutions or at least meaningful warnings pointing to a solution--see How do I enable password reset ? #2247 (comment) above, which led to me creating a separate issue: Show prominent warning and howto in user and admin interfaces when user-initiated password reset is impossible #8017. Closing the issue citing a command doesn't solve the original GUI problem, that's what was saying. It doesn't mean that command line tips are invalid, it just means they don't solve the issue. Again, I'm not trying to be unwelcoming. I'm a user trying to get my problem solved.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests