Home / Blog / Post
Enable Passwordless Sudo For User
Added on 22nd May 2019 in Snippet

In some situtations you might have a user which needs access to sudo but you dont know or have a password, for example when you only have ssh-key access to a server.

To enable this we just need to modify the sudoers file:

  1. Open Sudoers File

    sudo vim /etc/sudoers
  2. Find the line containing includedir /etc/sudoers.d and add the following and save

    theusersusernamehere ALL=(ALL) NOPASSWD: ALL

Hi there, I am christopher shaw, a software developer form South Yorkshire, England.

I love tinkering with all things tech, and opened this website as a web presence for myself and a place to keep my notes and snippets. Hopefully you will find something here to help

Christopher Shaw