How to fix 'sudo: no tty present and no askpass program specified' error?

前端 未结 26 1681
失恋的感觉
失恋的感觉 2020-11-22 03:36

I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that need to be ran as sudo.

When I compile the sour

26条回答
  •  醉酒成梦
    2020-11-22 04:20

    For Ubuntu 16.04 users

    There is a file you have to read with:

    cat /etc/sudoers.d/README
    

    Placing a file with mode 0440 in /etc/sudoers.d/myuser with following content:

    myuser  ALL=(ALL) NOPASSWD: ALL
    

    Should fix the issue.

    Do not forget to:

    chmod 0440 /etc/sudoers.d/myuser
    

提交回复
热议问题