     #
 
     {username,newPassword} = options
-
-    chpw = exec "echo '#{newPassword}' | /usr/bin/passwd --stdin #{username}", (err,stdout,stderr)=>
+    userInputs = [newPassword]
+    cmd = bash "echo %s | /usr/bin/passwd --stdin #{username}", userInputs
+    chpw = exec cmd, (err,stdout,stderr)=>
       if err?
         log.error "[ERROR] can't set password for #{username}: #{stderr}"
         callback? "[ERROR] can't set password for #{username}: #{stderr}"

                                                                 .replace(/\s/g, '\\ ')

makedirp = (path, user, cb)->
  exec "mkdir -p #{path} && chown #{user}: #{path}", cb

createAppsDir = (user, cb)->
  path = escapePath "/Users/#{user}/Applications"

      console.error err if err
      callback? err, null

    exec bash("test -d %s", [versionedPath]), (err, stdout, stderr)->
      if err or stderr.length
        cb "[ERROR] Version is not exists!", version
      else
        userInputs = [latestPath, versionedPath, latestPath]
        cmd = bash "rm -f %s && ln -s %s %s", userInputs
        exec cmd, (err, stdout, stderr)->
          if err or stderr then cb err
          else cb null

