[from now] 2013/04/12 00:38:07

diff --git a/Rakefile b/Rakefile
index c0b9cf4..2b1cbfb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
 task :default => "cookbook:validate"

 task :setup do
-  sh "chef-solo -c ./config/solo.rb -j ./nodes/local.json"
+  sh "sudo chef-solo -c ./config/solo.rb -j ./nodes/local.json"
 end

 namespace :cookbook do
diff --git a/site-cookbooks/config/recipes/shell.rb b/site-cookbooks/config/recipes/shell.rb
index 80c77a8..6f26ab3 100644
--- a/site-cookbooks/config/recipes/shell.rb
+++ b/site-cookbooks/config/recipes/shell.rb
@@ -1,13 +1,13 @@
 bash "set zsh to default shell" do
-  user "root"
-  group "wheel"
+  user 'root'
+  group 'wheel'
   code <<-EOT
     _etc_shells=/etc/shells
     _zsh_path=/usr/local/bin/zsh
     _zsh_path_in_etc_shells=$(cat $_etc_shells | grep $_zsh_path)

     if [ "X"$_zsh_path_in_etc_shells = "X" ]; then
-      echo _zsh_path >> $_zsh_path
+      echo _zsh_path >> $_etc_shells
     fi

     chsh -s $_zsh_path fukayatsu
diff --git a/site-cookbooks/dotfiles/recipes/default.rb b/site-cookbooks/dotfiles/recipes/default.rb
index ce9323d..87b80ac 100644
--- a/site-cookbooks/dotfiles/recipes/default.rb
+++ b/site-cookbooks/dotfiles/recipes/default.rb
@@ -15,13 +15,8 @@ git node['user']['home'] + "/github/fukayatsu/dotfiles" do
 end

 bash "setup-dotfiles" do
-  user node['user']['name']
-  group node['user']['group']
-  cwd node['user']['home']
-  environment "HOME" => node['user']['home']
-
   code <<-EOC
     cd ~/github/fukayatsu/dotfiles
-    ./symlink.sh
+    sudo -u fukayatsu ./symlink.sh
   EOC
 end