¿cuanta gente a visto el blog?

Como ejecutar comandos especificos Sin Sudo

 https://unix.stackexchange.com/questions/276474/how-can-i-execute-any-command-as-a-normal-user-without-sudo

  1. Add these to the end of /etc/sudoers

    USERNAME HOST_NAME = (root) NOPASSWD: /usr/bin/apt-get
    USERNAME HOST_NAME = (root) NOPASSWD: /usr/bin/shutdown
    
  2. Add these to your ~/.bashrc

    alias shutdown='sudo shutdown'
    alias apt-get='sudo apt-get'
    
  3. Reload the startup config for the current session.

    $ source ~/.bashrc
    
  4. Now you can run the commands as a normal user without being prompted for a root/sudo password (and therefore, eliminate the need to know the password altogether).

    $ apt-get update
    $ apt-get upgrade
    $ shutdown -h now

No hay comentarios.:

Publicar un comentario