Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RStudioAD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Dirk Sarpe
RStudioAD
Commits
da460e11
Commit
da460e11
authored
7 years ago
by
Dirk Sarpe
Browse files
Options
Downloads
Patches
Plain Diff
add local users, fix missing / and replace tabs
parent
10f747f6
No related branches found
No related tags found
1 merge request
!1
integrate new version of Homesdir
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homedirs.sh
+9
-6
9 additions, 6 deletions
homedirs.sh
with
9 additions
and
6 deletions
homedirs.sh
+
9
−
6
View file @
da460e11
...
...
@@ -6,6 +6,7 @@ set -e
# trap read debug
rgroup
=
"g_r_users"
localrgroup
=
"local_r_users"
home
=
"/homes/"
work
=
"/work/"
rstudiodir
=
".rstudio"
...
...
@@ -21,7 +22,9 @@ fi
# make sure that fresh credentials are pulled
sss_cache
-E
unset
rusers
rusers
=
"
$(
getent group
$rgroup
|
awk
-F
'[/:]'
'{print $4}'
)
"
rusers
=
"
$rusers
,
$(
getent group
$localrgroup
|
awk
-F
'[/:]'
'{print $4}'
)
"
IFS
=
$','
read
-a
ruserar
<<<
"
$rusers
"
for
ruser
in
"
${
ruserar
[@]
}
"
do
...
...
@@ -29,17 +32,17 @@ for ruser in "${ruserar[@]}"
if
[
!
-d
$home$ruser
]
then
mkhomedir_helper
$ruser
$umask
$skel
setfacl
-m
u:
$monitoringuser
:rx
$home$ruser
setfacl
-m
u:
$monitoringuser
:rx
$home$ruser
fi
# symlink .rstudio directory to work storage
if
[
!
-d
$work$ruser$rstudiodir
]
if
[
!
-d
$work$ruser
/
$rstudiodir
]
then
mkdir
-p
$work$ruser
/
$rstudiodir
mkdir
-p
$home$ruser
/
$rstudiodir
setfacl
-m
u:
$monitoringuser
:rx
$work$ruser
setfacl
-m
u:
$monitoringuser
:rx
$work$ruser
/
$rstudiodir
setfacl
-m
u:
$ruser
:rwx
$work$ruser
setfacl
-m
u:
$ruser
:rwx
$work$ruser
/
$rstudiodir
setfacl
-m
u:
$monitoringuser
:rx
$work$ruser
setfacl
-m
u:
$monitoringuser
:rx
$work$ruser
/
$rstudiodir
setfacl
-m
u:
$ruser
:rwx
$work$ruser
setfacl
-m
u:
$ruser
:rwx
$work$ruser
/
$rstudiodir
mount
--bind
$work$ruser
/
$rstudiodir
$home$ruser
/
$rstudiodir
#ln -s $work$ruser/$rstudiodir $home$ruser/$rstudiodir
#chattr +i $home$ruser/$rstudiodir
...
...
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