mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
firstboot: reading firstboot-wizard-secret file
Explain how to read the firstboot-wizard-secret file using shell commands. Remove output of the cat command. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
00725b3526
commit
815d3ec0e8
8
debian/templates
vendored
8
debian/templates
vendored
@ -2,8 +2,8 @@ Template: plinth/firstboot_wizard_secret
|
|||||||
Type: note
|
Type: note
|
||||||
#flag:translate!:3
|
#flag:translate!:3
|
||||||
_Description: FreedomBox first wizard secret - ${secret}
|
_Description: FreedomBox first wizard secret - ${secret}
|
||||||
Please save this string. You will be asked to enter this in the first screen
|
Please note down the above secret. You will be asked to enter this in the
|
||||||
after you launch the FreedomBox interface. In case you lose it, you can find
|
first screen after you launch the FreedomBox web interface. In case you lose
|
||||||
it in the file /var/lib/plinth/firstboot-wizard-secret.
|
it, you can retrieve it by running the following command:
|
||||||
.
|
.
|
||||||
${secret}
|
$ sudo cat /var/lib/plinth/firstboot-wizard-secret
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from plinth import cfg
|
||||||
from plinth.modules import first_boot
|
from plinth.modules import first_boot
|
||||||
|
|
||||||
|
|
||||||
@ -26,9 +27,11 @@ class FirstbootWizardSecretForm(forms.Form):
|
|||||||
secret = forms.CharField(
|
secret = forms.CharField(
|
||||||
label='', help_text=_(
|
label='', help_text=_(
|
||||||
'Enter the secret generated during FreedomBox installation. '
|
'Enter the secret generated during FreedomBox installation. '
|
||||||
'This secret can also be obtained from the file '
|
'This secret can also be obtained by running the command "sudo '
|
||||||
'/var/lib/plinth/firstboot-wizard-secret'), required=False,
|
'cat /var/lib/plinth/firstboot-wizard-secret" on your {box_name}'.
|
||||||
widget=forms.PasswordInput(attrs={'placeholder': _('Secret')}))
|
format(box_name=_(cfg.box_name))), required=False,
|
||||||
|
widget=forms.PasswordInput(
|
||||||
|
attrs={'placeholder': _('Firstboot Wizard Secret')}))
|
||||||
|
|
||||||
def validate_secret(self, secret):
|
def validate_secret(self, secret):
|
||||||
"""Match the secret provided by the user with the one
|
"""Match the secret provided by the user with the one
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user