KeyError: "getpwnam(): name not found: 'erpnext'"

Trying to get version 13 running. Getting the following error when running ‘sudo bench setup production erpnext --yes’

Port configuration list:

Site assigned port: 80
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jgregory/.bench/bench/”, line 41, in cli
File “/usr/local/lib/python3.8/dist-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.8/dist-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.8/dist-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.8/dist-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.8/dist-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/jgregory/.bench/bench/commands/”, line 73, in setup_production
setup_production(user=user, yes=yes)
File “/home/jgregory/.bench/bench/config/”, line 17, in setup_production
fix_prod_setup_perms(bench_path, frappe_user=user)
File “/home/jgregory/.bench/bench/”, line 732, in fix_prod_setup_perms
uid = pwd.getpwnam(frappe_user).pw_uid
KeyError: “getpwnam(): name not found: ‘erpnext’”

1 Like

i’m facing this issue still, did you get to resolve this?


run command in bench directory

I have also same problem ,

I need to go production so I can add another site with ERPNext14 main site
and Insights as the 2nd site

after a lot of searching and tries , always failed to run both on one ubuntu

and that’s because I’m still in development mode for both , and I turned on the Multitenant

NOW I struggling on another issue , its prevent to switch to production.

I don’t want to start over again , because i need to understand what’s the problem and how to solve it.