sudo: no passwd entry for app! (Capistrano)

If you’ve recently upgraded to Capistrano 2.3+ like I have, you may run into a gotcha with Capistrano’s use of the “sudo” command for a nonexistent “app” user.

If you receive an error that looks like this:

*** [err :: server.hostname.com] sudo: no passwd entry for app!

Then you need to update your deploy file to include the following line:

set :runner, “deploy” (or whatever user you are running as for your deploy)

This error will then promptly go away! Yay!

7 comments ↓

#1 Tony Perrie on 05.12.08 at 11:22 pm

Whoa, we both “bogged” about Rails on the same day.

#2 Garrett Dimon on 05.28.08 at 4:44 pm

Thanks for sharing this. I was having the same problem, and this seems to have done the trick!

#3 damon on 05.29.08 at 8:02 am

Garrett, excellent!

#4 Charles de Bueger on 06.02.08 at 3:21 am

yes, thanks for this worked great. any clues as to what i need to do if my deployment usercode is different to my subversion repository usercode? presumably it’s a setting in the same deply file, but i’m not sure what it should be

#5 damon on 06.02.08 at 8:44 am

Charles,

The primary ssh/Unix user is set with:

set :user, “bob”

A user who can do sudo tasks:

set :runner, “deploy”

Some deploys set the repository with the username in the repository url:

set :repository, “svn+ssh://#{user}@#{domain}#{deploy_to}/repos/trunk”

#6 Enrico Teotti on 07.10.08 at 11:07 pm

thanks, I had the same issue.
I am wondering why there is no capistrano wiki…

#7 damon on 07.11.08 at 3:31 pm

Enrico: yeah, there’s not a wiki, per se (that I know of). they do run a Lighthouse project here which I think anyone can submit doc patches to.

Leave a Comment