if not ch_core.host.user_exists(self.mysqlrouter_user): ch_core.host.adduser( self.mysqlrouter_user, shell="/usr/sbin/nologin", system_user=True, primary_group=self.mysqlrouter_group, home_dir=self.mysqlrouter_home_dir)
So perhaps something else is adding the /bin/sh for mysql-router? Is the mysql-client installed?
Thanks @ggouzi
So the charm "ought" to be using /usr/sbin/nologin as the shell, according to this code in (https:/ /opendev. org/openstack/ charm-mysql- router/ src/commit/ 46c5d68b7256cd4 f9416cc5578a772 05da0be493/ src/lib/ charm/openstack /mysql_ router. py#L299):
if not ch_core. host.user_ exists( self.mysqlroute r_user) :
ch_ core.host. adduser(
self. mysqlrouter_ user, shell=" /usr/sbin/ nologin" ,
system_ user=True, primary_ group=self. mysqlrouter_ group,
home_ dir=self. mysqlrouter_ home_dir)
So perhaps something else is adding the /bin/sh for mysql-router? Is the mysql-client installed?