To allow local user authentication when external authentication methods are present, configure the authentication order to include password:
set system authentication-order password
This command ensures that local password authentication is prioritized or used as a fallback in the authentication flow. Without this configuration, Junos will attempt TACACS+ first and deny access if the user is not defined there.