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

398
Vistas
Building a switch user tool: How to gain root permissions without dependencies

I've been trying to make my own sudo program in Python, but I don't want to have any dependencies (like su or pkexec). How would I gain root access? Ideas:

  1. Have the file always have root access (with chmod +[smth])
  2. Somehow login as root (maybe with subprocess)
  3. Use something built in (kind of a low-level dependency) and pass it the root password.

How would I do any of these or is there a different way? Or is Python even low level enough to do this?

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

0

If it's not a project and the goal is only to not have sudo dependencies while having root access, there are some sudo alternatives. Use at your own risk, I have no experience with these. Also, I don't see pkexec or su being dependencies on the Arch or Ubuntu packages sites, but on Arch you can always force remove packages without removing any dependencies by using sudo pacman -Rdd package_name.

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