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
65f1c4be
Commit
65f1c4be
authored
Feb 17, 2018
by
Peter Parente
Committed by
GitHub
Feb 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #556 from avinson/master
improve secure_path modification by storing in sudoers.d
parents
9faed6a1
ead1caec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
base-notebook/start.sh
base-notebook/start.sh
+2
-2
No files found.
base-notebook/start.sh
View file @
65f1c4be
...
@@ -17,7 +17,7 @@ if [ $(id -u) == 0 ] ; then
...
@@ -17,7 +17,7 @@ if [ $(id -u) == 0 ] ; then
# Handle username change. Since this is cheap, do this unconditionally
# Handle username change. Since this is cheap, do this unconditionally
echo
"Set username to:
$NB_USER
"
echo
"Set username to:
$NB_USER
"
usermod
-d
/home/
$NB_USER
-l
$NB_USER
jovyan
usermod
-d
/home/
$NB_USER
-l
$NB_USER
jovyan
# Handle case where provisioned storage does not have the correct permissions by default
# Handle case where provisioned storage does not have the correct permissions by default
# Ex: default NFS/EFS (no auto-uid/gid)
# Ex: default NFS/EFS (no auto-uid/gid)
if
[[
"
$CHOWN_HOME
"
==
"1"
||
"
$CHOWN_HOME
"
==
'yes'
]]
;
then
if
[[
"
$CHOWN_HOME
"
==
"1"
||
"
$CHOWN_HOME
"
==
'yes'
]]
;
then
...
@@ -60,7 +60,7 @@ if [ $(id -u) == 0 ] ; then
...
@@ -60,7 +60,7 @@ if [ $(id -u) == 0 ] ; then
fi
fi
# Add $CONDA_DIR/bin to sudo secure_path
# Add $CONDA_DIR/bin to sudo secure_path
sed
-r
i
"s#Defaults
\s
+secure_path=
\"
([^
\"
]+)
\"
#Defaults secure_path=
\"\1
:
$CONDA_DIR
/bin
\"
#"
/etc/sudoers
sed
-r
"s#Defaults
\s
+secure_path=
\"
([^
\"
]+)
\"
#Defaults secure_path=
\"\1
:
$CONDA_DIR
/bin
\"
#"
/etc/sudoers |
grep
secure_path
>
/etc/sudoers.d/path
# Exec the command as NB_USER with the PATH and the rest of
# Exec the command as NB_USER with the PATH and the rest of
# the environment preserved
# the environment preserved
...
...
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