Solved jail: getpwnam: No such file or directory

I have followed this guide to run Devuan in FreeBSD. I used to be able to jexec into it. But the jail does not get listed again when I run "jls". Surprisingly, I see the jail listed among other jails when I run "ezjail list". I did not create the jail with ezjail.
The problem is not principally that.. Rather, it is about getting rid of the below error so that the jail can autostart like others.
Can anyone please tell me how to get rid of the getpwnam error and start the jail? I have tried several things - copying master pwd in /etc/, creating user, etc - but no luck. I followed the guide step-by-step; I don't know why only me get that error.


Code:
# jail -c devuan
devuan: created
jail: devuan: getpwnam: No such file or directory
jail: devuan: /etc/init.d/rc 3: failed
devuan: removed

# ezjail-admin start devuan
Starting jails:/etc/rc.d/jail: WARNING: /var/run/jail.devuan.conf is created and used for jail devuan.
 cannot start jail  "devuan":
10
jail: devuan: getpwnam root: No such file or directory
jail: devuan: /etc/init.d/rc 3: failed
.
/etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables  is obsolete.  Please consider migrating to /etc/jail.conf.
Error: Could not start servdevuan.
  You need to start it by hand.
 
Have you figured it out?
I have the same issue with getpwnam: No such file or directory.
The funny thing is that this jail was copied from another box where it's perfectly working 24/7!
I don't use ezjail, everyhting is configured manually, and other jails (FreeBSD) are working fine.
 
Have you figured it out?
I have the same issue with getpwnam: No such file or directory.
The funny thing is that this jail was copied from another box where it's perfectly working 24/7!
I don't use ezjail, everyhting is configured manually, and other jails (FreeBSD) are working fine.
Not yet, I have abandoned it for now until there are new tips/tweaks.
 
When you jexec(8) into the jail, do commands like getent passwd work?
Code:
# jexec gen5 getent passwd
jexec: jail "gen5" is dying

The solution from here (under "Troubleshooting Tips" section) works:
Code:
# cd /my/jail/path/etc
# echo "root::0:0::0:0:Charlie &:/root:/bin/bash" > master.passwd
# pwd_mkdb -d ./ -p master.passwd
pwd_mkdb: warning, unknown root shell
without need to run the subsequent commands they suggest:
Code:
# chroot /my/jail/path /bin/bash
# cd /etc
# pwconv
# grpconv
# passwd
Changing password for user root.
New password:
Retype new password:
......
passwd: all authentication tokens updated successfully.
 
Debian works fine in bhyve; Devuan is fine in a box. I may try it in a bhyve soon again.
 
Back
Top