Commit 2228f01f authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[BUGFIX] Don't change the group id as this could lead to critical problems on OSX

parent d7a07abd
......@@ -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']
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment