Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
ed251e9c
Commit
ed251e9c
authored
Jul 16, 2015
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/config: fix a problem with encrypted root password
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
c189e26c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
apply_dot-config
userspace/rootfs_override/wr/bin/apply_dot-config
+3
-2
No files found.
userspace/rootfs_override/wr/bin/apply_dot-config
View file @
ed251e9c
...
...
@@ -47,8 +47,9 @@ passwd=""
if
[
!
-z
"
$CONFIG_ROOT_PWD_CLEAR
"
]
;
then
passwd
=
$(
/wr/bin/mkpasswd
--method
=
md5
"
$CONFIG_ROOT_PWD_CLEAR
"
)
fi
if
[
!
-z
"
$CONFIG_ROOT_PWD_CYPHER
"
]
;
then
passwd
=
"
$CONFIG_ROOT_PWD_CYPHER
"
if
[
!
-z
"
$CONFIG_ROOT_PWD_IS_ENCRYPTED
"
]
;
then
#problem: the password includes '$', so the shell assignment failed.
passwd
=
$(
busybox
awk
'-F"'
'/PWD_CYPHER/ {print $2}'
/wr/etc/dot-config
)
fi
if
[
!
-z
"
$passwd
"
]
;
then
sed
-i
"s,^root:[^:]*:,root:
$passwd
:,"
/etc/shadow
...
...
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