Sous FreeBSD, je cherchais comment utiliser le nom du jail à la place du JID dans la commande jexec. A priori d’après le man c’est possible :
-n jailname
The name of the jail, if given upon creation of the jail. This
is not the hostname of the jail.Bingo, j’essaye :
jexec -n monjail '' ls
Ca pète le message d’erreur suivant :
jexec: Cannot identify jail.
je vérifie vingt fois le nom de mon jail et retente çamarchepas. Je décide donc de mater dans le man de jail (RTFM rulez) et je trouve ça :
-n jailname Assign and administrative name to the jail that can be used
for management or auditing purposes. The system will not
enforce the name to be unique.Une fois la ligne jail_monjail_flags=”-n monjail” ajoutée dans le rc.conf et le service jail relancé çamarchemieux.
Merci de l’astuce j’essayais de faire la même chose.