Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Chef Cookbooks
ubuntu_base
Commits
2228f01f
Commit
2228f01f
authored
Feb 13, 2015
by
Stefan Galinski
🎮
Browse files
[BUGFIX] Don't change the group id as this could lead to critical problems on OSX
parent
d7a07abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
recipes/default.rb
View file @
2228f01f
...
...
@@ -56,10 +56,11 @@ execute 'apt-get -y upgrade'
bash
'changeUserId'
do
cwd
'/home/vagrant/'
code
<<-
EOF
cat /etc/group | sed s'/vagrant:x:1000/vagrant:x:
#{
data_bag
[
'groupId'
]
}
/' > /home/vagrant/group.bak
mv /home/vagrant/group.bak /etc/group
# don't change the group id as this is usually a lower one on e.g. OSX that is already taken by the system
#cat /etc/group | sed s'/vagrant:x:1000/vagrant:x:
#{
data_bag
[
'groupId'
]
}
/' > /home/vagrant/group.bak
#mv /home/vagrant/group.bak /etc/group
cat /etc/passwd | sed s'/vagrant:x:1000:1000/vagrant:x:
#{
data_bag
[
'userId'
]
}
:
#{
data_bag
[
'groupId'
]
}
/' > /home/vagrant/passwd.bak
cat /etc/passwd | sed s'/vagrant:x:1000:1000/vagrant:x:
#{
data_bag
[
'userId'
]
}
:
1000
/' > /home/vagrant/passwd.bak
mv /home/vagrant/passwd.bak /etc/passwd
chown -R vagrant:vagrant /home/vagrant
...
...
@@ -135,4 +136,4 @@ end
locales
'Add locales'
do
locales
node
[
'ubuntu_base'
][
'locales'
]
end
\ No newline at end of file
end
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