Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

340
Vistas
Ansible equivalent of "passwd -l"

I'm trying to lock a user account that I just created with Ansible (it should not be possible to log into this account). I know you can do this using the shell module by running "passwd -l".

Is there a way to do this via the user module, or something similar?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I think that's not possible.

Maybe the following is an option?

 - user: 
     name: someone
     shell: /sbin/nologin

I think this is even more secure than using passwd -l as the latter would only disable the password. The user would still be able to login by ssh key authentication.

over 4 years ago · Santiago Trujillo Denunciar

0

You can use attribute 'password_lock' password_lock: yes

^^ This is the equivalent of 'usermod -L'

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda