Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
d64d747e
Commit
d64d747e
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Changing user passwords
parent
71eee18b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-controlpanel
+17
-6
17 additions, 6 deletions
src/freedombone-controlpanel
with
17 additions
and
6 deletions
src/freedombone-controlpanel
+
17
−
6
View file @
d64d747e
...
...
@@ -40,6 +40,9 @@ ADMIN_USER=
UPGRADE_SCRIPT_NAME
=
"
${
PROJECT_NAME
}
-upgrade"
UPDATE_DATE_SCRIPT
=
/usr/bin/updatedate
# Minimum number of characters in a password
MINIMUM_PASSWORD_LENGTH
=
8
USB_DRIVE
=
sdb
# get default USB from config file
CONFIG_FILE
=
$HOME
/
${
PROJECT_NAME
}
.cfg
...
...
@@ -196,12 +199,20 @@ function change_password {
if
[
!
$SELECTED_USERNAME
]
;
then
return
fi
clear
echo
-n
$"Change password for"
echo
"
$SELECTED_USERNAME
"
echo
""
su
-c
"passwd"
-
$SELECTED_USERNAME
any_key
dialog
--title
$"Change password"
\
--passwordbox
$"New password for user
$SELECTED_USERNAME
"
8 40 2>
$data
newpassword
=
$(
<
$data
)
if
[
${#
newpassword
}
-lt
${
MINIMUM_PASSWORD_LENGTH
}
]
;
then
dialog
--title
$"Change password"
\
--msgbox
$"The password should be
${
MINIMUM_PASSWORD_LENGTH
}
or more characters"
6 40
return
fi
echo
"
$SELECTED_USERNAME
:
$newpassword
"
|chpasswd
dialog
--title
$"Change password"
\
--msgbox
$"Password for
$SELECTED_USERNAME
was changed"
6 40
}
function
irc_set_global_password
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment