Project

General

Profile

Actions

Bug #2574

open

rake permissions:reset doesn't work without a fully qualified domain name

Added by Cédric Dupont almost 12 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Hi,

As explain on foreman users mailing list, when I enable the login setting, default password is not working.
When I check the users table, admin has no password set.
Try the : rake permissions:reset RAILS_ENV=production

It's just giving as an output that the email format is wrong.
In the users table, if I check admin has root@ as email. No domain name is set on server (maybe related to none set in email)

So this is making impossible to use the login true in settings

Actions #1

Updated by Greg Sutcliffe almost 12 years ago

  • Subject changed from Wrong admin email, password is not set during installation and rake reset task doesn't reset it too to rake permissions:reset doesn't work without a fully qualified domain name

Cedric, indeed this because you don't have a domain name set on the host - the rake task defaults to using the domain name for the admin email. This means you get root@<blank> which is invalid, and this the password reset fails to save.

How do you think this should work in this scenario? Simply assuming a 'fake' domain name will lead to an email address that can't be used. Should we perhaps allow the user to override the email address via a commandline option? Something like:

bundle exec rake permissions:reset email=myrealadminaddress@myrealdomain.com

How does that look?

Actions #2

Updated by Cédric Dupont almost 12 years ago

Yes, the idea of email as a parameter is good.

That's right if there is no domain name, using a fake domain the mail will not be avalaible. But still possible to change it after. I get an issue already with no domain name in facts, the fqdn fact is blank by default in Puppet without a domain name, and reports not uploaded to Foreman in this case. (need updating /usr/lib/ruby/site_ruby/1.8/facter/fqdn.rb in our case, as a lot of our servers are still not using fqdn)

Actions #3

Updated by Ohad Levy almost 12 years ago

how about not validate email on rake tasks (db migrate, reset etc)

upon first login, when an account has no email, you would have to enter one anyway

Actions #4

Updated by Cédric Dupont almost 12 years ago

For me this looks even better. No need to know about the option in case you fall in this case.

Actions #5

Updated by Leos Stejskal about 4 years ago

  • Description updated (diff)
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF