1

I’ve inherited some systems that runs on the FreeBSD operating system and inside jails. Basically the services running are old versions of qmail, spamd, Dovecot, etc. None of the versions are up to date or even maintainable any more.

At present we can’t move from these systems but I would at least like to be able to troubleshoot them.

My question:

Normally I would be able to run for example service qmail status and get some info about the top level process. How do I do this inside a jail? In the case of the qmail process I can use qmailctl but what would be the equivalent for spamd or Dovecot?

Also how do you go about troubleshooting these types of services? The logs don’t really give a very good steer on what could be going wrong.

2
  • 2
    Start with the man pages for jls(8) and jexec(8). Use jls to query the name or ID number of the jail you're interested in, and then you can use jexec to launch a shell within that particular jail. Once you're in, it's just like managing any other qmail/spamd/dovecot installation. Also, the service(8) utility itself is jail-aware. See the man page and note the -j command line switch. Commented Jan 7, 2020 at 23:00
  • Anything you can do with service name command can be directed into jail N by using service -j N name command. Commented Jan 19 at 0:51

1 Answer 1

0
# jls JID IP Address Hostname Path 1 127.0.0.2 ports12.localhost /SPACE/jails/ports12 2 127.0.0.3 py37jail.localhost /SPACE/jails/py37jail 

OK now I know what jails are running. I'm going to logon as root as root is understood in the ports12.localhost jail(8)

jexec -l -U root 1 root@ports12:~ # 

Now that you know how to get in. You can do whatever you like, as you would normally do on the/a host system. Nearly every command is available, as would be on the Host system. When you're done. You can simply type exit, or use the key combination of ^d That is; the Ctrl+d keys. See also: jexec(8), jls(8), and jail.conf(5)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.