Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NGS-intro-course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
courses
NGS-intro-course
Commits
03e85ec5
Commit
03e85ec5
authored
Mar 31, 2014
by
Laros
Browse files
Options
Downloads
Patches
Plain Diff
Added script that adds / resets accounts.
parent
9ed567af
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/mk_acct.sh
+35
-0
35 additions, 0 deletions
server/mk_acct.sh
with
35 additions
and
0 deletions
server/mk_acct.sh
0 → 100644
+
35
−
0
View file @
03e85ec5
#!/bin/sh
#
# This script makes a number of accounts, removing existing ones.
#
username
=
"course"
number_of_accounts
=
30
echo
-n
"Please provide a password: "
stty
-echo
read
password
echo
stty echo
i
=
0
while
[
$i
-lt
$number_of_accounts
]
;
do
number
=
$i
if
[
$i
-lt
10
]
;
then
number
=
0
$i
fi
echo
$username$number
deluser
--remove-home
$username$number
>
/dev/null 2>&1
cat
<<
EOF
| adduser
$username$number
> /dev/null 2>&1
$password
$password
EOF
i
=
$((
i
+
1
))
done
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
sign in
to comment