Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
d73f472b
Commit
d73f472b
authored
Jan 19, 2020
by
Peter Parente
Committed by
GitHub
Jan 19, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #924 from adriendelsalle/patch-1
Modify the way to change user uid/gid
parents
cd158647
d66e26cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
base-notebook/start.sh
base-notebook/start.sh
+8
-12
No files found.
base-notebook/start.sh
View file @
d73f472b
...
...
@@ -76,18 +76,14 @@ if [ $(id -u) == 0 ] ; then
fi
fi
# Change UID of NB_USER to NB_UID if it does not match
if
[
"
$NB_UID
"
!=
$(
id
-u
$NB_USER
)
]
;
then
echo
"Set
$NB_USER
UID to:
$NB_UID
"
usermod
-u
$NB_UID
$NB_USER
fi
# Set NB_USER primary gid to NB_GID (after making the group). Set
# supplementary gids to NB_GID and 100.
if
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
echo
"Add
$NB_USER
to group:
$NB_GID
"
groupadd
-g
$NB_GID
-o
${
NB_GROUP
:-${
NB_USER
}}
usermod
-g
$NB_GID
-aG
100
$NB_USER
# Change UID:GID of NB_USER to NB_UID:NB_GID if it does not match
if
[
"
$NB_UID
"
!=
$(
id
-u
$NB_USER
)
]
||
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
echo
"Set user
$NB_USER
UID:GID to:
$NB_UID
:
$NB_GID
"
if
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
groupadd
-g
$NB_GID
-o
${
NB_GROUP
:-${
NB_USER
}}
fi
userdel
$NB_USER
useradd
--home
/home/
$NB_USER
-u
$NB_UID
-g
$NB_GID
-G
100
-l
$NB_USER
fi
# Enable sudo if requested
...
...
Write
Preview
Markdown
is supported
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