Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sysop-bioinformatics
management_scripts
Commits
df388118
Commit
df388118
authored
Aug 16, 2021
by
Haarst, Jan van
Browse files
Convert username and supervisor to lower case.
parent
86d5355a
Changes
1
Hide whitespace changes
Inline
Side-by-side
create_new_user.sh
View file @
df388118
#!/bin/bash
#!/bin/bash
SCRIPTPATH
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
SCRIPTPATH
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
set
-o
nounset
set
-o
nounset
set
-o
errexit
set
-o
errexit
...
@@ -12,6 +13,7 @@ fi
...
@@ -12,6 +13,7 @@ fi
# Variables
# Variables
NEW_USER
=
${
1
}
NEW_USER
=
${
1
}
NEW_USER
=
"
${
NEW_USER
,,
}
"
ADMINPASSWORD
=
''
ADMINPASSWORD
=
''
binddn
=
${
SUDO_USER
}
@wurnet.nl
binddn
=
${
SUDO_USER
}
@wurnet.nl
declare
-A
DN_ARRAY
declare
-A
DN_ARRAY
...
@@ -125,6 +127,7 @@ fi
...
@@ -125,6 +127,7 @@ fi
if
[
"
$STUDENT
"
==
"Y"
]
if
[
"
$STUDENT
"
==
"Y"
]
then
then
read
-p
"Who is the supervisor of
$NEW_USER
? "
SUPERVISOR
read
-p
"Who is the supervisor of
$NEW_USER
? "
SUPERVISOR
SUPERVISOR
=
"
${
SUPERVISOR
,,
}
"
read
-p
"What is the end date for access for
$NEW_USER
? [
${
DEFAULT_END_DATE
}
] "
END_DATE
read
-p
"What is the end date for access for
$NEW_USER
? [
${
DEFAULT_END_DATE
}
] "
END_DATE
END_DATE
=
${
END_DATE
:-${
DEFAULT_END_DATE
}}
END_DATE
=
${
END_DATE
:-${
DEFAULT_END_DATE
}}
echo
echo
...
...
Write
Preview
Supports
Markdown
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