Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R_basis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
LBMC
Hub
formations
R_basis
Commits
d7550ca6
Commit
d7550ca6
authored
2 years ago
by
Carine Rey
Browse files
Options
Downloads
Patches
Plain Diff
add script to add users in rstudio server from a list
parent
a3a44f12
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
Switch to main as default branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/create_users_from_user_pwd_list.sh
+29
-0
29 additions, 0 deletions
src/create_users_from_user_pwd_list.sh
with
29 additions
and
0 deletions
src/create_users_from_user_pwd_list.sh
0 → 100755
+
29
−
0
View file @
d7550ca6
#! /usr/bin/bash
# USAGE
# upload create_users_from_user_pwd_list.sh and user_pwd_list.tsv
# bash create_users_from_user_pwd_list.sh user_pwd_list.tsv
USER_PASSWORD_FILENAME
=
$@
while
IFS
=
$'
\t
'
read
-r
GROUPE NAME SURNAME MAIL LOGIN_CBP PASSWD_CBP LABO R_USERNAME R_PASSWD
;
do
if
[[
$MAIL
=
~
"@"
]]
then
echo
"=========================================="
echo
user:
$NAME
$SURNAME
$MAIL
$LABO
group:
$GROUPE
if
!
[[
$GROUPE
=
~
"L"
]]
then
echo
computer_login:
$LOGIN_CBP
echo
computer_passwd:
$PASSWD_CBP
else
echo
computer_login:
"TP"
echo
computer_passwd:
fi
echo
r_login:
$R_USERNAME
echo
r_passwd:
$R_PASSWD
adduser
${
R_USERNAME
}
--gecos
'First Last,RoomNumber,WorkPhone,HomePhone'
--disabled-password
--force-badname
>
/dev/null
echo
"
${
R_USERNAME
}
:
${
R_PASSWD
}
"
| chpasswd
>
/dev/null
fi
done
<
$USER_PASSWORD_FILENAME
echo
"=========================================="
\ No newline at end of file
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