Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
ee873727
Commit
ee873727
authored
Dec 30, 2014
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: tweak password reset just a wee bit more
parent
f3d9e10b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
rc.initial.password
src/etc/rc.initial.password
+9
-9
No files found.
src/etc/rc.initial.password
View file @
ee873727
...
...
@@ -27,8 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once
(
'config.inc'
);
require_once
(
'auth.inc'
);
require_once
(
'functions.inc'
);
...
...
@@ -36,12 +34,15 @@ require_once('shaper.inc');
$fp
=
fopen
(
'php://stdin'
,
'r'
);
printf
(
_
(
"The %s password will be reset to the factory default `%s'."
),
$g
[
'factory_shipped_username'
],
$g
[
'factory_shipped_password'
]);
printf
(
"
\n
"
);
printf
(
_
(
'The %s password will be reset to the factory default of `%s\'.'
),
$g
[
'factory_shipped_username'
],
$g
[
'factory_shipped_password'
]
);
printf
(
"
\n\n
"
);
printf
(
_
(
'Do you want to proceed [y|n]? '
));
if
(
strcasecmp
(
chop
(
fgets
(
$fp
)),
"y"
)
==
0
)
{
if
(
strcasecmp
(
chop
(
fgets
(
$fp
)),
'y'
)
==
0
)
{
if
(
isset
(
$config
[
'system'
][
'webgui'
][
'authmode'
])
&&
$config
[
'system'
][
'webgui'
][
'authmode'
]
!=
"Local Database"
)
{
echo
"
\n
"
.
gettext
(
'
...
...
@@ -72,10 +73,9 @@ The User manager authentication server is set to "' . $config['system']['webgui'
local_user_set
(
$admin_user
);
write_config
(
$config
,
gettext
(
"password changed from console menu"
));
printf
(
"
\n\n
"
);
printf
(
_
(
"The password has been reset."
));
printf
(
"
\n
"
);
printf
(
_
(
"Please change the password as soon as you log in!"
));
printf
(
"
\n\n
"
);
printf
(
_
(
"Press any key to continue."
));
fgets
(
$fp
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment